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

Fix #39, Remove initializations causing Cppcheck errors #40

Merged
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
32 changes: 16 additions & 16 deletions fsw/src/md_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ extern MD_AppData_t MD_AppData;

void MD_ProcessStartCmd(const CFE_SB_Buffer_t *BufPtr)
{
int32 ErrorCount = 0;
int32 Status = CFE_SUCCESS;
int32 NumTblInMask = 0; /* Purely as info for event message */
uint16 TableId = 0;
uint16 TableIndex = 0;
int32 ErrorCount = 0;
int32 Status;
int32 NumTblInMask = 0; /* Purely as info for event message */
uint16 TableId = 0;
uint16 TableIndex;
MD_CmdStartStop_t *Start = (MD_CmdStartStop_t *)BufPtr;
bool AnyTablesInMask = false;

Expand Down Expand Up @@ -130,12 +130,12 @@ void MD_ProcessStartCmd(const CFE_SB_Buffer_t *BufPtr)

void MD_ProcessStopCmd(const CFE_SB_Buffer_t *BufPtr)
{
int32 ErrorCount = 0;
int32 Status = CFE_SUCCESS;
int32 NumTblInMask = 0; /* Purely as info for event message */
MD_CmdStartStop_t *Stop = (MD_CmdStartStop_t *)BufPtr;
uint16 TableId = 0;
uint16 TableIndex = 0;
int32 ErrorCount = 0;
int32 Status;
int32 NumTblInMask = 0; /* Purely as info for event message */
MD_CmdStartStop_t *Stop = (MD_CmdStartStop_t *)BufPtr;
uint16 TableId = 0;
uint16 TableIndex;
bool AnyTablesInMask = false;

for (TableId = 1; TableId <= MD_NUM_DWELL_TABLES; TableId++)
Expand Down Expand Up @@ -192,13 +192,13 @@ void MD_ProcessStopCmd(const CFE_SB_Buffer_t *BufPtr)
void MD_ProcessJamCmd(const CFE_SB_Buffer_t *BufPtr)
{
/* Local variables */
int32 Status = CFE_SUCCESS;
int32 Status;
MD_CmdJam_t * Jam = 0;
bool AllInputsValid = true;
cpuaddr ResolvedAddr = 0;
MD_DwellControlEntry_t *DwellEntryPtr = 0; /* points to local task data */
uint16 EntryIndex = 0;
uint8 TableIndex = 0;
MD_DwellControlEntry_t *DwellEntryPtr; /* points to local task data */
uint16 EntryIndex;
uint8 TableIndex = 0;
MD_SymAddr_t NewDwellAddress;

/*
Expand Down Expand Up @@ -407,7 +407,7 @@ void MD_ProcessJamCmd(const CFE_SB_Buffer_t *BufPtr)

void MD_ProcessSignatureCmd(const CFE_SB_Buffer_t *BufPtr)
{
int32 Status = CFE_SUCCESS;
int32 Status;
MD_CmdSetSignature_t *SignatureCmd = (MD_CmdSetSignature_t *)BufPtr;
uint16 TblId = 0;
uint16 StringLength;
Expand Down
8 changes: 4 additions & 4 deletions fsw/src/md_dwell_pkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ extern MD_AppData_t MD_AppData;

void MD_DwellLoop(void)
{
int32 Result = 0;
int32 Result;
uint16 TblIndex;
uint16 EntryIndex = 0;
uint16 NumDwellAddresses = 0;
MD_DwellPacketControl_t *TblPtr = NULL;
uint16 EntryIndex;
uint16 NumDwellAddresses;
MD_DwellPacketControl_t *TblPtr = NULL;

/* Check each dwell table */
for (TblIndex = 0; TblIndex < MD_NUM_DWELL_TABLES; TblIndex++)
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/md_dwell_tbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ int32 MD_ReadDwellTable(const MD_DwellTableLoad_t *TblPtr, uint16 *ActiveAddrCou
/******************************************************************************/
int32 MD_CheckTableEntries(MD_DwellTableLoad_t *TblPtr, uint16 *ErrorEntryArg)
{
int32 Status = CFE_SUCCESS;
int32 Status;
int32 FirstErrorCode = CFE_SUCCESS;
uint16 EntryIndex;
int32 FirstBadIndex = -1;
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/md_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ bool MD_Verify16Aligned(cpuaddr Address, uint32 Size)
bool MD_ResolveSymAddr(MD_SymAddr_t *SymAddr, cpuaddr *ResolvedAddr)
{
bool Valid;
int32 OS_Status = OS_SUCCESS;
int32 OS_Status;

/*
** NUL terminate the very end of the symbol name string array as a
Expand Down