-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove NATIVE_INT_TYPE, NATIVE_UINT_TYPE, and POINTER_CAST from Svc #3374
base: devel
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
@@ -30,7 +30,7 @@ | |||
m_cycleSlips(0) { | |||
} | |||
|
|||
void ActiveRateGroup::configure( NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts) { | |||
void ActiveRateGroup::configure(U32 contexts[], FwIndexType numContexts) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
HealthComponentBase::init(queueDepth, instance); | ||
this->queue_depth = queueDepth; | ||
|
||
} | ||
|
||
void HealthImpl::setPingEntries(PingEntry* pingEntries, NATIVE_INT_TYPE numPingEntries, U32 watchDogCode) { | ||
void HealthImpl::setPingEntries(PingEntry* pingEntries, FwIndexType numPingEntries, U32 watchDogCode) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -203,12 +204,12 @@ | |||
this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); | |||
} | |||
|
|||
NATIVE_INT_TYPE HealthImpl::findEntry(const Fw::CmdStringArg& entry) { | |||
|
|||
FwIndexType HealthImpl::findEntry(const Fw::CmdStringArg& entry) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -20,17 +20,17 @@ | |||
|
|||
namespace Svc { | |||
|
|||
void LinuxTimerComponentImpl::startTimer(NATIVE_INT_TYPE interval) { | |||
void LinuxTimerComponentImpl::startTimer(FwSizeType interval) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -23,7 +23,7 @@ | |||
|
|||
PassiveRateGroup::~PassiveRateGroup() {} | |||
|
|||
void PassiveRateGroup::configure(NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts) { | |||
void PassiveRateGroup::configure(U32 contexts[], FwIndexType numContexts) { |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -161,7 +162,7 @@ | |||
|
|||
void HealthImpl::HLTH_PING_ENABLE_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& entry, Fw::Enabled enable) { | |||
// check to see if entry is in range | |||
NATIVE_INT_TYPE entryIndex = this->findEntry(entry); | |||
FwIndexType entryIndex = this->findEntry(entry); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
@@ -181,7 +182,7 @@ | |||
|
|||
void HealthImpl::HLTH_CHNG_PING_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& entry, U32 warningValue, U32 fatalValue) { | |||
// check to see if entry is in range | |||
NATIVE_INT_TYPE entryIndex = this->findEntry(entry); | |||
FwIndexType entryIndex = this->findEntry(entry); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
itval.it_interval.tv_nsec = (interval*1000000)%1000000000; | ||
itval.it_value.tv_sec = interval/1000; | ||
itval.it_value.tv_nsec = (interval*1000000)%1000000000; | ||
const FwSizeType interval_secs = interval/1000; |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
@@ -54,11 +59,11 @@ | |||
void TlmChan::TlmGet_handler(FwIndexType portNum, FwChanIdType id, Fw::Time& timeTag, Fw::TlmBuffer& val) { | |||
// Compute index for entry | |||
|
|||
NATIVE_UINT_TYPE index = this->doHash(id); | |||
FwChanIdType index = this->doHash(id); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
@@ -81,14 +86,14 @@ | |||
void TlmChan::TlmRecv_handler(FwIndexType portNum, FwChanIdType id, Fw::Time& timeTag, Fw::TlmBuffer& val) { | |||
// Compute index for entry | |||
|
|||
NATIVE_UINT_TYPE index = this->doHash(id); | |||
FwChanIdType index = this->doHash(id); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
|
||
packetLen += packetList.list[pktEntry]->list[tlmEntry].size; | ||
|
||
} // end channel in packet | ||
FW_ASSERT(packetLen <= FW_COM_BUFFER_MAX_SIZE, static_cast<FwAssertArgType>(packetLen), static_cast<FwAssertArgType>(pktEntry)); | ||
// clear contents | ||
memset(this->m_fillBuffers[pktEntry].buffer.getBuffAddr(), 0, packetLen); | ||
memset(this->m_fillBuffers[pktEntry].buffer.getBuffAddr(), 0, static_cast<size_t>(packetLen)); |
Check warning
Code scanning / CodeQL
Unchecked return value Warning
memset
@@ -127,15 +130,15 @@ | |||
} | |||
|
|||
TlmPacketizer::TlmEntry* TlmPacketizer::findBucket(FwChanIdType id) { | |||
NATIVE_UINT_TYPE index = this->doHash(id); | |||
FwChanIdType index = this->doHash(id); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
@@ -186,7 +189,7 @@ | |||
Fw::TlmBuffer& val) { | |||
FW_ASSERT(this->m_configured); | |||
// get hash value for id | |||
NATIVE_UINT_TYPE index = this->doHash(id); | |||
FwChanIdType index = this->doHash(id); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
@@ -30,7 +30,7 @@ | |||
m_cycleSlips(0) { | |||
} | |||
|
|||
void ActiveRateGroup::configure( NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts) { | |||
void ActiveRateGroup::configure(U32 contexts[], FwIndexType numContexts) { |
Check notice
Code scanning / CodeQL
No raw arrays in interfaces Note
@@ -23,7 +23,7 @@ | |||
|
|||
PassiveRateGroup::~PassiveRateGroup() {} | |||
|
|||
void PassiveRateGroup::configure(NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts) { | |||
void PassiveRateGroup::configure(U32 contexts[], FwIndexType numContexts) { |
Check notice
Code scanning / CodeQL
No raw arrays in interfaces Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all looks good to me, just checking on one TODO
Change Description
This removes old NATIVE_INT_TYPE, NATIVE_UINT_TYPE, and POINTER_CAST types from the Svc directory.
Decisions: @LeStarch
U32
to match other system context variablesFwSignedSizeType
as-1
is used as a flag valueDecisions: @timcanham
U32
to match other system context variablesFwSignedSizeType
as-1
is used as a flag valueDecisions: @bocchino
U32
to match other system context variablesFwSignedSizeType
as-1
is used as a flag valueDecisions: @thomas-bc
U32
to match other system context variablesFwSignedSizeType
as-1
is used as a flag value