Skip to content

Commit

Permalink
Merge pull request #29 from thnkslprpt/fix-28-remove-initializations-…
Browse files Browse the repository at this point in the history
…causing-cppcheck-failure

Fix #28, Remove initializations causing Cppcheck failure
  • Loading branch information
dzbaker authored Jan 12, 2023
2 parents 7438c19 + cdb9075 commit 518bea7
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions fsw/src/hk_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void HK_ProcessIncomingHkData(const CFE_SB_Buffer_t *BufPtr)
uint8 * SrcPtr = NULL;
size_t MessageLength = 0;
int32 MessageErrors = 0;
int32 LastByteAccessed = 0;
int32 LastByteAccessed;

CFE_MSG_GetMsgId(&BufPtr->Msg, &MessageID);

Expand Down Expand Up @@ -116,19 +116,19 @@ int32 HK_ValidateHkCopyTable(void *TblPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32 HK_ProcessNewCopyTable(hk_copy_table_entry_t *CpyTblPtr, hk_runtime_tbl_entry_t *RtTblPtr)
{
hk_copy_table_entry_t * StartOfCopyTable = NULL;
hk_copy_table_entry_t * OuterCpyEntry = NULL;
hk_copy_table_entry_t * InnerDefEntry = NULL;
hk_runtime_tbl_entry_t *StartOfRtTable = NULL;
hk_runtime_tbl_entry_t *OuterRtEntry = NULL;
hk_runtime_tbl_entry_t *InnerRtEntry = NULL;
int32 Loop1 = 0;
int32 Loop2 = 0;
CFE_SB_MsgId_t MidOfThisPacket = CFE_SB_INVALID_MSG_ID;
int32 SizeOfThisPacket = 0;
int32 FurthestByteFromThisEntry = 0;
CFE_SB_Buffer_t * NewPacketAddr = 0;
int32 Result = CFE_SUCCESS;
hk_copy_table_entry_t * StartOfCopyTable = NULL;
hk_copy_table_entry_t * OuterCpyEntry = NULL;
hk_copy_table_entry_t * InnerDefEntry = NULL;
hk_runtime_tbl_entry_t *StartOfRtTable = NULL;
hk_runtime_tbl_entry_t *OuterRtEntry = NULL;
hk_runtime_tbl_entry_t *InnerRtEntry = NULL;
int32 Loop1 = 0;
int32 Loop2;
CFE_SB_MsgId_t MidOfThisPacket;
int32 SizeOfThisPacket;
int32 FurthestByteFromThisEntry;
CFE_SB_Buffer_t * NewPacketAddr;
int32 Result;

/* Ensure that the input arguments are valid */
if (((void *)CpyTblPtr == NULL) || ((void *)RtTblPtr == NULL))
Expand Down Expand Up @@ -270,11 +270,11 @@ int32 HK_TearDownOldCopyTable(hk_copy_table_entry_t *CpyTblPtr, hk_runtime_tbl_e
hk_runtime_tbl_entry_t *OuterRtEntry = NULL;
hk_runtime_tbl_entry_t *InnerRtEntry = NULL;
int32 Loop1 = 0;
int32 Loop2 = 0;
CFE_SB_MsgId_t MidOfThisPacket = CFE_SB_INVALID_MSG_ID;
void * OutputPktAddr = NULL;
void * SavedPktAddr = NULL;
int32 Result = CFE_SUCCESS;
int32 Loop2;
CFE_SB_MsgId_t MidOfThisPacket;
void * OutputPktAddr = NULL;
void * SavedPktAddr = NULL;
int32 Result;

/* Ensure that the input arguments are valid */
if (((void *)CpyTblPtr == NULL) || ((void *)RtTblPtr == NULL))
Expand Down

0 comments on commit 518bea7

Please sign in to comment.