Skip to content

Commit

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

Fix #52, Remove initializations causing Cppcheck errors
  • Loading branch information
dzbaker committed Jan 12, 2023
2 parents 1268e29 + 4598152 commit a99b890
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions fsw/src/hs_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ void HS_HousekeepingReq(const CFE_SB_Buffer_t *BufPtr)
CFE_ES_TaskInfo_t TaskInfo;
memset(&TaskInfo, 0, sizeof(TaskInfo));
#endif
int32 Status = CFE_SUCCESS;
uint32 TableIndex = 0;
int32 Status;
uint32 TableIndex;

/*
** Verify message packet length
Expand Down
10 changes: 5 additions & 5 deletions fsw/src/hs_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ void HS_UtilDiagReport(void)
{
uint32 DiagValue[HS_UTIL_TIME_DIAG_ARRAY_LENGTH];
uint32 DiagCount[HS_UTIL_TIME_DIAG_ARRAY_LENGTH];
uint32 i = 0;
uint32 j = 0;
uint32 ThisValue = 0;
uint32 i = 0;
uint32 j;
uint32 ThisValue;

uint32 Ordinal = 0;
uint32 NewOrdinalIndex = 0;
uint32 Ordinal;
uint32 NewOrdinalIndex;
uint32 OutputValue[HS_UTIL_DIAG_REPORTS];
uint32 OutputCount[HS_UTIL_DIAG_REPORTS];
uint32 OutputOrdinal[HS_UTIL_DIAG_REPORTS];
Expand Down
36 changes: 18 additions & 18 deletions fsw/src/hs_monitors.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
void HS_MonitorApplications(void)
{
CFE_ES_AppInfo_t AppInfo;
CFE_ES_AppId_t AppId = CFE_ES_APPID_UNDEFINED;
int32 Status = CFE_SUCCESS;
uint32 TableIndex = 0;
uint16 ActionType = 0;
CFE_ES_AppId_t AppId = CFE_ES_APPID_UNDEFINED;
int32 Status;
uint32 TableIndex = 0;
uint16 ActionType;
uint32 MsgActsIndex = 0;
CFE_SB_Buffer_t *BufPtr = NULL;

Expand Down Expand Up @@ -223,10 +223,10 @@ void HS_MonitorApplications(void)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_MonitorEvent(const CFE_EVS_LongEventTlm_t *EventPtr)
{
uint32 TableIndex = 0;
int32 Status = CFE_SUCCESS;
CFE_ES_AppId_t AppId = CFE_ES_APPID_UNDEFINED;
uint16 ActionType = 0;
uint32 TableIndex = 0;
int32 Status = CFE_SUCCESS;
CFE_ES_AppId_t AppId = CFE_ES_APPID_UNDEFINED;
uint16 ActionType;
uint32 MsgActsIndex = 0;
CFE_SB_Buffer_t *SendPtr = NULL;

Expand Down Expand Up @@ -456,11 +456,11 @@ int32 HS_ValidateAMTable(void *TableData)

int32 TableResult = CFE_SUCCESS;
uint32 TableIndex = 0;
int32 EntryResult = 0;
int32 EntryResult;

uint16 ActionType = 0;
uint16 CycleCount = 0;
uint16 NullTerm = 0;
uint16 ActionType;
uint16 CycleCount;
uint16 NullTerm;

uint32 GoodCount = 0;
uint32 BadCount = 0;
Expand Down Expand Up @@ -547,11 +547,11 @@ int32 HS_ValidateEMTable(void *TableData)

int32 TableResult = CFE_SUCCESS;
uint32 TableIndex = 0;
int32 EntryResult = 0;
int32 EntryResult;

uint16 ActionType = 0;
uint16 EventID = 0;
uint16 NullTerm = 0;
uint16 ActionType;
uint16 EventID;
uint16 NullTerm;

uint32 GoodCount = 0;
uint32 BadCount = 0;
Expand Down Expand Up @@ -732,8 +732,8 @@ int32 HS_ValidateMATable(void *TableData)
int32 TableResult = CFE_SUCCESS;
uint32 TableIndex = 0;
size_t Length = 0;
uint16 EnableState = 0;
int32 EntryResult = 0;
uint16 EnableState;
int32 EntryResult;

CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID;
CFE_SB_Buffer_t *BufPtr = (CFE_SB_Buffer_t *)NULL;
Expand Down

0 comments on commit a99b890

Please sign in to comment.