Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes NATIVE_INT_TYPE, NATIVE_UINT_TYPE, and POINTER_CAST from Fw #3286

Open
wants to merge 18 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Drv/Ports/DataTypes/DataBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
return *this;
}

NATIVE_UINT_TYPE DataBuffer::getBuffCapacity() const {
FwSizeType DataBuffer::getBuffCapacity() const {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

getBuffCapacity uses the basic integral type unsigned long rather than a typedef with size and signedness.
return sizeof(this->m_data);
}

Expand Down
2 changes: 1 addition & 1 deletion Drv/Ports/DataTypes/DataBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Drv {
virtual ~DataBuffer();
DataBuffer& operator=(const DataBuffer& other);

NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
FwSizeType getBuffCapacity() const; // !< returns capacity, not current size, of buffer
U8* getBuffAddr();
const U8* getBuffAddr() const;

Expand Down
4 changes: 2 additions & 2 deletions Fw/Buffer/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
return stat;
}
#endif
stat = buffer.serialize(reinterpret_cast<POINTER_CAST>(this->m_bufferData));
stat = buffer.serialize(reinterpret_cast<PlatformPointerCastType>(this->m_bufferData));

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter buffer has not been checked.
if (stat != Fw::FW_SERIALIZE_OK) {
return stat;
}
Expand Down Expand Up @@ -146,7 +146,7 @@
return Fw::FW_DESERIALIZE_TYPE_MISMATCH;
}
#endif
POINTER_CAST pointer;
PlatformPointerCastType pointer;

Check notice

Code scanning / CodeQL

Use of basic integral type Note

pointer uses the basic integral type unsigned long rather than a typedef with size and signedness.
stat = buffer.deserialize(pointer);
if (stat != Fw::FW_SERIALIZE_OK) {
return stat;
Expand Down
4 changes: 2 additions & 2 deletions Fw/Cmd/CmdArgBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Fw {

CmdArgBuffer::CmdArgBuffer(const U8 *args, NATIVE_UINT_TYPE size) {
CmdArgBuffer::CmdArgBuffer(const U8 *args, FwSizeType size) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

size uses the basic integral type unsigned long rather than a typedef with size and signedness.
SerializeStatus stat = this->setBuff(args,size);
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<FwAssertArgType>(stat));
}
Expand All @@ -29,7 +29,7 @@
return *this;
}

NATIVE_UINT_TYPE CmdArgBuffer::getBuffCapacity() const {
FwSizeType CmdArgBuffer::getBuffCapacity() const {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

getBuffCapacity uses the basic integral type unsigned long rather than a typedef with size and signedness.
return sizeof(this->m_bufferData);
}

Expand Down
4 changes: 2 additions & 2 deletions Fw/Cmd/CmdArgBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ namespace Fw {
SERIALIZED_SIZE = FW_CMD_ARG_BUFFER_MAX_SIZE + sizeof(I32) //!< size when serialized. Buffer + size of buffer
};

CmdArgBuffer(const U8 *args, NATIVE_UINT_TYPE size); //!< buffer source constructor
CmdArgBuffer(const U8 *args, FwSizeType size); //!< buffer source constructor
CmdArgBuffer(); //!< default constructor
CmdArgBuffer(const CmdArgBuffer& other); //!< other arg buffer constructor
virtual ~CmdArgBuffer(); //!< destructor
CmdArgBuffer& operator=(const CmdArgBuffer& other); //!< Equal operator

NATIVE_UINT_TYPE getBuffCapacity() const; //!< return capacity of buffer (how much it can hold)
FwSizeType getBuffCapacity() const; //!< return capacity of buffer (how much it can hold)
U8* getBuffAddr(); //!< return address of buffer (non const version)
const U8* getBuffAddr() const; //!< return address of buffer (const version)

Expand Down
4 changes: 2 additions & 2 deletions Fw/Com/ComBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Fw {

ComBuffer::ComBuffer(const U8 *args, NATIVE_UINT_TYPE size) {
ComBuffer::ComBuffer(const U8 *args, FwSizeType size) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

size uses the basic integral type unsigned long rather than a typedef with size and signedness.
SerializeStatus stat = SerializeBufferBase::setBuff(args,size);
FW_ASSERT(FW_SERIALIZE_OK == stat,static_cast<FwAssertArgType>(stat));
}
Expand All @@ -29,7 +29,7 @@
return *this;
}

NATIVE_UINT_TYPE ComBuffer::getBuffCapacity() const {
FwSizeType ComBuffer::getBuffCapacity() const {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

getBuffCapacity uses the basic integral type unsigned long rather than a typedef with size and signedness.
return sizeof(this->m_bufferData);
}

Expand Down
4 changes: 2 additions & 2 deletions Fw/Com/ComBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ namespace Fw {
SERIALIZED_SIZE = FW_COM_BUFFER_MAX_SIZE + sizeof(FwBuffSizeType) // size of buffer + storage of size word
};

ComBuffer(const U8 *args, NATIVE_UINT_TYPE size);
ComBuffer(const U8 *args, FwSizeType size);
ComBuffer();
ComBuffer(const ComBuffer& other);
virtual ~ComBuffer();
ComBuffer& operator=(const ComBuffer& other);

NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
FwSizeType getBuffCapacity() const; // !< returns capacity, not current size, of buffer
U8* getBuffAddr();
const U8* getBuffAddr() const;

Expand Down
4 changes: 2 additions & 2 deletions Fw/Comp/ActiveComponentBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class ActiveComponentExitSerializableBuffer : public Fw::SerializeBufferBase {

public:
NATIVE_UINT_TYPE getBuffCapacity() const {
FwSizeType getBuffCapacity() const {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

getBuffCapacity uses the basic integral type unsigned long rather than a typedef with size and signedness.
return sizeof(m_buff);
}

Expand All @@ -33,7 +33,7 @@
ActiveComponentBase::~ActiveComponentBase() {
}

void ActiveComponentBase::init(NATIVE_INT_TYPE instance) {
void ActiveComponentBase::init(FwEnumStoreType instance) {
QueuedComponentBase::init(instance);
}

Expand Down
2 changes: 1 addition & 1 deletion Fw/Comp/ActiveComponentBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ActiveComponentBase : public QueuedComponentBase {

explicit ActiveComponentBase(const char* name); //!< Constructor
virtual ~ActiveComponentBase(); //!< Destructor
void init(NATIVE_INT_TYPE instance); //!< initialization code
void init(FwEnumStoreType instance); //!< initialization code
virtual void preamble(); //!< A function that will be called before the event loop is entered
MsgDispatchStatus dispatch(); //!< The function that will dispatching messages
virtual void finalizer(); //!< A function that will be called after exiting the loop
Expand Down
6 changes: 3 additions & 3 deletions Fw/Comp/PassiveComponentBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
return "Comp: %s";
}

void PassiveComponentBase::toString(char* buffer, NATIVE_INT_TYPE size) {
void PassiveComponentBase::toString(char* buffer, FwSizeType size) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

buffer uses the basic integral type char rather than a typedef with size and signedness.

Check notice

Code scanning / CodeQL

Use of basic integral type Note

size uses the basic integral type unsigned long rather than a typedef with size and signedness.

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
FW_ASSERT(size > 0);
FW_ASSERT(buffer != nullptr);
Fw::FormatStatus status = Fw::ExternalString(buffer, static_cast<Fw::ExternalString::SizeType>(size)).format(
Expand All @@ -34,12 +34,12 @@
PassiveComponentBase::~PassiveComponentBase() {
}

void PassiveComponentBase::init(NATIVE_INT_TYPE instance) {
void PassiveComponentBase::init(FwEnumStoreType instance) {
ObjBase::init();
this->m_instance = instance;
}

NATIVE_INT_TYPE PassiveComponentBase::getInstance() const {
FwEnumStoreType PassiveComponentBase::getInstance() const {
return this->m_instance;
}

Expand Down
8 changes: 4 additions & 4 deletions Fw/Comp/PassiveComponentBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ namespace Fw {
PROTECTED:
PassiveComponentBase(const char* name); //!< Named constructor
virtual ~PassiveComponentBase(); //!< Destructor
void init(NATIVE_INT_TYPE instance); //!< Initialization function
NATIVE_INT_TYPE getInstance() const;
void init(FwEnumStoreType instance); //!< Initialization function
FwEnumStoreType getInstance() const;


#if FW_OBJECT_TO_STRING == 1
virtual const char* getToStringFormatString(); //!< Return the format for a generic component toString
void toString(char* str, NATIVE_INT_TYPE size) override; //!< returns string description of component
void toString(char* str, FwSizeType size) override; //!< returns string description of component
#endif
PRIVATE:
U32 m_idBase; //!< ID base for opcodes etc.
NATIVE_INT_TYPE m_instance; //!< instance of component object
FwEnumStoreType m_instance; //!< instance of component object


};
Expand Down
4 changes: 2 additions & 2 deletions Fw/Comp/QueuedComponentBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

}

void QueuedComponentBase::init(NATIVE_INT_TYPE instance) {
void QueuedComponentBase::init(FwEnumStoreType instance) {
PassiveComponentBase::init(instance);
}

Expand All @@ -36,7 +36,7 @@
return this->m_queue.create(queueName, depth, msgSize);
}

NATIVE_INT_TYPE QueuedComponentBase::getNumMsgsDropped() {
FwSizeType QueuedComponentBase::getNumMsgsDropped() {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

getNumMsgsDropped uses the basic integral type unsigned long rather than a typedef with size and signedness.
return this->m_msgsDropped;
}

Expand Down
6 changes: 3 additions & 3 deletions Fw/Comp/QueuedComponentBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
PROTECTED:
QueuedComponentBase(const char* name); //!< Constructor
virtual ~QueuedComponentBase(); //!< Destructor
void init(NATIVE_INT_TYPE instance); //!< initialization function
void init(FwEnumStoreType instance); //!< initialization function
Os::Queue m_queue; //!< queue object for active component
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize);
virtual MsgDispatchStatus doDispatch()=0; //!< method to dispatch a single message in the queue.
#if FW_OBJECT_TO_STRING == 1
virtual const char* getToStringFormatString(); //!< Format string for toString function
#endif
NATIVE_INT_TYPE getNumMsgsDropped(); //!< return number of messages dropped
FwSizeType getNumMsgsDropped(); //!< return number of messages dropped
void incNumMsgDropped(); //!< increment the number of messages dropped
PRIVATE:
NATIVE_INT_TYPE m_msgsDropped; //!< number of messages dropped from full queue
FwSizeType m_msgsDropped; //!< number of messages dropped from full queue

Check notice

Code scanning / CodeQL

Use of basic integral type Note

m_msgsDropped uses the basic integral type unsigned long rather than a typedef with size and signedness.
};

}
Expand Down
2 changes: 1 addition & 1 deletion Fw/Dp/DpContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Utils::HashBuffer DpContainer::computeDataHash() const {
FW_ASSERT(DATA_OFFSET + dataSize <= bufferSize, static_cast<FwAssertArgType>(DATA_OFFSET + dataSize),
static_cast<FwAssertArgType>(bufferSize));
Utils::HashBuffer computedHash;
Utils::Hash::hash(dataAddr, static_cast<NATIVE_INT_TYPE>(dataSize), computedHash);
Utils::Hash::hash(dataAddr, dataSize, computedHash);
return computedHash;
}

Expand Down
2 changes: 1 addition & 1 deletion Fw/Dp/test/util/DpContainerHeader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct DpContainerHeader {
DP_CONTAINER_HEADER_ASSERT_EQ(status, FW_SERIALIZE_OK);
// Deserialize the user data
DpContainerHeader::moveDeserToOffset(file, line, buffer, DpContainer::Header::USER_DATA_OFFSET);
NATIVE_UINT_TYPE size = sizeof this->m_userData;
FwSizeType size = sizeof this->m_userData;
const bool omitLength = true;
status = serializeRepr.deserialize(this->m_userData, size, omitLength);
DP_CONTAINER_HEADER_ASSERT_EQ(status, FW_SERIALIZE_OK);
Expand Down
4 changes: 2 additions & 2 deletions Fw/Log/AmpcsEvrLogPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace Fw {
}

SerializeStatus AmpcsEvrLogPacket::deserialize(SerializeBufferBase& buffer) {
NATIVE_UINT_TYPE len;
FwSizeType len;

SerializeStatus stat;

Expand All @@ -75,7 +75,7 @@ namespace Fw {
return stat;
}

NATIVE_UINT_TYPE size = buffer.getBuffLeft();
FwSizeType size = buffer.getBuffLeft();
stat = buffer.deserialize(this->m_logBuffer.getBuffAddr(),size,true);
if (stat == FW_SERIALIZE_OK) {
// Shouldn't fail
Expand Down
4 changes: 2 additions & 2 deletions Fw/Log/LogBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Fw {

LogBuffer::LogBuffer(const U8 *args, NATIVE_UINT_TYPE size) {
LogBuffer::LogBuffer(const U8 *args, FwSizeType size) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

size uses the basic integral type unsigned long rather than a typedef with size and signedness.
SerializeStatus stat = SerializeBufferBase::setBuff(args,size);
FW_ASSERT(FW_SERIALIZE_OK == stat, static_cast<FwAssertArgType>(stat));
}
Expand All @@ -29,7 +29,7 @@
return *this;
}

NATIVE_UINT_TYPE LogBuffer::getBuffCapacity() const {
FwSizeType LogBuffer::getBuffCapacity() const {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

getBuffCapacity uses the basic integral type unsigned long rather than a typedef with size and signedness.
return sizeof(this->m_bufferData);
}

Expand Down
4 changes: 2 additions & 2 deletions Fw/Log/LogBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ namespace Fw {
SERIALIZED_SIZE = FW_LOG_BUFFER_MAX_SIZE + sizeof(FwBuffSizeType)
};

LogBuffer(const U8 *args, NATIVE_UINT_TYPE size);
LogBuffer(const U8 *args, FwSizeType size);
LogBuffer();
LogBuffer(const LogBuffer& other);
virtual ~LogBuffer();
LogBuffer& operator=(const LogBuffer& other);

NATIVE_UINT_TYPE getBuffCapacity() const; // !< returns capacity, not current size, of buffer
FwSizeType getBuffCapacity() const; // !< returns capacity, not current size, of buffer
U8* getBuffAddr();
const U8* getBuffAddr() const;

Expand Down
2 changes: 1 addition & 1 deletion Fw/Log/LogPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}

// remainder of buffer must be telemetry value
NATIVE_UINT_TYPE size = buffer.getBuffLeft();
FwSizeType size = buffer.getBuffLeft();

Check notice

Code scanning / CodeQL

Use of basic integral type Note

size uses the basic integral type unsigned long rather than a typedef with size and signedness.
stat = buffer.deserialize(this->m_logBuffer.getBuffAddr(),size,true);
if (stat == FW_SERIALIZE_OK) {
// Shouldn't fail
Expand Down
14 changes: 7 additions & 7 deletions Fw/Logger/test/ut/LoggerRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bool Register::precondition(const MockLogging::FakeLogger& truth) {
// Register NULL or truth as the system logger
void Register::action(MockLogging::FakeLogger& truth) {
// Select a registration value: 1 -> logger, 0 -> NULL
NATIVE_INT_TYPE random = STest::Pick::lowerUpper(0, 1);
U32 random = STest::Pick::lowerUpper(0, 1);
if (random == 1) {
Fw::Logger::registerLogger(&truth);
truth.s_current = &truth;
Expand All @@ -48,8 +48,8 @@ bool LogGood::precondition(const MockLogging::FakeLogger& truth) {

// Log valid messages
void LogGood::action(MockLogging::FakeLogger& truth) {
NATIVE_INT_TYPE random = STest::Pick::lowerUpper(0, 10);
NATIVE_INT_TYPE ra[10];
U32 random = STest::Pick::lowerUpper(0, 10);
U32 ra[10];
for (int i = 0; i < 10; ++i) {
ra[i] = STest::Pick::lowerUpper(0, 0xffffffff);
}
Expand Down Expand Up @@ -127,8 +127,8 @@ bool LogGoodStringObject::precondition(const MockLogging::FakeLogger& truth) {
// Log valid messages
void LogGoodStringObject::action(MockLogging::FakeLogger& truth) {
Fw::String my_string;
NATIVE_INT_TYPE random = STest::Pick::lowerUpper(0, my_string.getCapacity() - 1);
for (int i = 0; i < random; ++i) {
U32 random = STest::Pick::lowerUpper(0, my_string.getCapacity() - 1);
for (U32 i = 0; i < random; ++i) {
const_cast<char*>(my_string.toChar())[i] =
static_cast<char>(STest::Pick::lowerUpper(0, std::numeric_limits<unsigned char>::max()));
}
Expand All @@ -149,8 +149,8 @@ bool LogBad::precondition(const MockLogging::FakeLogger& truth) {

// Log valid messages
void LogBad::action(MockLogging::FakeLogger& truth) {
NATIVE_INT_TYPE random = STest::Pick::lowerUpper(0, 10);
NATIVE_INT_TYPE ra[10];
U32 random = STest::Pick::lowerUpper(0, 10);
U32 ra[10];
for (int i = 0; i < 10; ++i) {
ra[i] = STest::Pick::lowerUpper(0, 0xffffffff);
}
Expand Down
2 changes: 1 addition & 1 deletion Fw/Obj/ObjBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
this->m_objName = name;
}
#if FW_OBJECT_TO_STRING == 1
void ObjBase::toString(char* str, NATIVE_INT_TYPE size) {
void ObjBase::toString(char* str, FwSizeType size) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

str uses the basic integral type char rather than a typedef with size and signedness.

Check notice

Code scanning / CodeQL

Use of basic integral type Note

size uses the basic integral type unsigned long rather than a typedef with size and signedness.
FW_ASSERT(size > 0);
FW_ASSERT(str != nullptr);
Fw::FormatStatus formatStatus = Fw::ExternalString(str, static_cast<Fw::ExternalString::SizeType>(size)).format("Obj: %s", this->m_objName.toChar());
Expand Down
2 changes: 1 addition & 1 deletion Fw/Obj/ObjBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace Fw {
//!
//! \param str destination buffer where string description is placed
//! \param size destination buffer size (including terminator). String should be terminated
virtual void toString(char* str, NATIVE_INT_TYPE size); //!< virtual method to get description of object
virtual void toString(char* str, FwSizeType size); //!< virtual method to get description of object
#endif // FW_OBJECT_TO_STRING
#endif // FW_OBJECT_NAMES

Expand Down
6 changes: 3 additions & 3 deletions Fw/Obj/SimpleObjRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ObjBase::setObjRegistry(this);
this->m_numEntries = 0;
// Initialize pointer array
for (NATIVE_INT_TYPE entry = 0; entry < FW_OBJ_SIMPLE_REG_ENTRIES; entry++) {
for (FwSizeType entry = 0; entry < FW_OBJ_SIMPLE_REG_ENTRIES; entry++) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

entry uses the basic integral type unsigned long rather than a typedef with size and signedness.
this->m_objPtrArray[entry] = nullptr;
}
}
Expand All @@ -23,7 +23,7 @@
}

void SimpleObjRegistry::dump() {
for (NATIVE_INT_TYPE obj = 0; obj < this->m_numEntries; obj++) {
for (FwSizeType obj = 0; obj < this->m_numEntries; obj++) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

obj uses the basic integral type unsigned long rather than a typedef with size and signedness.
#if FW_OBJECT_NAMES == 1
#if FW_OBJECT_TO_STRING == 1
char objDump[FW_OBJ_SIMPLE_REG_BUFF_SIZE];
Expand All @@ -43,7 +43,7 @@

#if FW_OBJECT_NAMES == 1
void SimpleObjRegistry::dump(const char* objName) {
for (NATIVE_INT_TYPE obj = 0; obj < this->m_numEntries; obj++) {
for (FwSizeType obj = 0; obj < this->m_numEntries; obj++) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

obj uses the basic integral type unsigned long rather than a typedef with size and signedness.
char objDump[FW_OBJ_SIMPLE_REG_BUFF_SIZE];
if (strncmp(objName,this->m_objPtrArray[obj]->getObjName(),sizeof(objDump)) == 0) {
#if FW_OBJECT_TO_STRING == 1
Expand Down
2 changes: 1 addition & 1 deletion Fw/Obj/SimpleObjRegistry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
private:
void regObject(ObjBase* obj); //!< register an object with the registry
ObjBase* m_objPtrArray[FW_OBJ_SIMPLE_REG_ENTRIES]; //!< array of objects
NATIVE_INT_TYPE m_numEntries; //!< number of entries in the registry
FwSizeType m_numEntries; //!< number of entries in the registry

Check notice

Code scanning / CodeQL

Use of basic integral type Note

m_numEntries uses the basic integral type unsigned long rather than a typedef with size and signedness.
};

}
Expand Down
2 changes: 1 addition & 1 deletion Fw/Port/PortBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
return "Port: %s %s->(%s)";
}

void PortBase::toString(char* buffer, NATIVE_INT_TYPE size) {
void PortBase::toString(char* buffer, FwSizeType size) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

buffer uses the basic integral type char rather than a typedef with size and signedness.

Check notice

Code scanning / CodeQL

Use of basic integral type Note

size uses the basic integral type unsigned long rather than a typedef with size and signedness.

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
FW_ASSERT(size > 0);
// Get the port-custom format string
const char* formatString = this->getToStringFormatString();
Expand Down
Loading
Loading