Skip to content

Commit

Permalink
Fix #1252, Squash potentially uninitialized variable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Mar 23, 2021
1 parent 98bc158 commit dd2e47f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion modules/es/fsw/src/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void CFE_ES_StartApplications(uint32 ResetType, const char *StartFilePath)
const char *TokenList[CFE_ES_STARTSCRIPT_MAX_TOKENS_PER_LINE];
uint32 NumTokens;
uint32 BuffLen; /* Length of the current buffer */
osal_id_t AppFile;
osal_id_t AppFile = OS_OBJECT_ID_UNDEFINED;
int32 Status;
char c;
bool LineTooLong = false;
Expand Down
6 changes: 3 additions & 3 deletions modules/es/fsw/src/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ int32 CFE_ES_QueryOneCmd(const CFE_ES_QueryOneCmd_t *data)
int32 CFE_ES_QueryAllCmd(const CFE_ES_QueryAllCmd_t *data)
{
CFE_FS_Header_t FileHeader;
osal_id_t FileDescriptor;
osal_id_t FileDescriptor = OS_OBJECT_ID_UNDEFINED;
uint32 i;
uint32 EntryCount = 0;
uint32 FileSize = 0;
Expand Down Expand Up @@ -1373,7 +1373,7 @@ int32 CFE_ES_QueryAllCmd(const CFE_ES_QueryAllCmd_t *data)
int32 CFE_ES_QueryAllTasksCmd(const CFE_ES_QueryAllTasksCmd_t *data)
{
CFE_FS_Header_t FileHeader;
osal_id_t FileDescriptor;
osal_id_t FileDescriptor = OS_OBJECT_ID_UNDEFINED;
uint32 i;
uint32 EntryCount = 0;
uint32 FileSize = 0;
Expand Down Expand Up @@ -1884,7 +1884,7 @@ int32 CFE_ES_SendMemPoolStatsCmd(const CFE_ES_SendMemPoolStatsCmd_t *data)
int32 CFE_ES_DumpCDSRegistryCmd(const CFE_ES_DumpCDSRegistryCmd_t *data)
{
CFE_FS_Header_t StdFileHeader;
osal_id_t FileDescriptor;
osal_id_t FileDescriptor = OS_OBJECT_ID_UNDEFINED;
int32 Status;
int16 RegIndex = 0;
const CFE_ES_DumpCDSRegistryCmd_Payload_t *CmdPtr = &data->Payload;
Expand Down
2 changes: 1 addition & 1 deletion modules/evs/fsw/src/cfe_evs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int32 CFE_EVS_WriteLogDataFileCmd(const CFE_EVS_WriteLogDataFileCmd_t *data)
int32 Result;
int32 LogIndex;
int32 BytesWritten;
osal_id_t LogFileHandle;
osal_id_t LogFileHandle = OS_OBJECT_ID_UNDEFINED;
uint32 i;
CFE_FS_Header_t LogFileHdr;
char LogFilename[OS_MAX_PATH_LEN];
Expand Down
2 changes: 1 addition & 1 deletion modules/evs/fsw/src/cfe_evs_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ int32 CFE_EVS_DeleteEventFilterCmd(const CFE_EVS_DeleteEventFilterCmd_t *data)
int32 CFE_EVS_WriteAppDataFileCmd(const CFE_EVS_WriteAppDataFileCmd_t *data)
{
int32 Result;
osal_id_t FileHandle;
osal_id_t FileHandle = OS_OBJECT_ID_UNDEFINED;
int32 BytesWritten;
uint32 EntryCount = 0;
uint32 i;
Expand Down
6 changes: 1 addition & 5 deletions modules/sb/fsw/src/cfe_sb_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ bool CFE_SB_WritePipeInfoDataGetter(void *Meta, uint32 RecordNum, void **Buffer,
CFE_SB_BackgroundFileStateInfo_t *BgFilePtr;
CFE_SB_PipeInfoEntry_t * PipeBufferPtr;
CFE_SB_PipeD_t * PipeDscPtr;
osal_id_t SysQueueId;
osal_id_t SysQueueId = OS_OBJECT_ID_UNDEFINED;
bool PipeIsValid;

BgFilePtr = (CFE_SB_BackgroundFileStateInfo_t *)Meta;
Expand Down Expand Up @@ -1099,10 +1099,6 @@ bool CFE_SB_WritePipeInfoDataGetter(void *Meta, uint32 RecordNum, void **Buffer,

SysQueueId = PipeDscPtr->SysQueueId;
}
else
{
SysQueueId = OS_OBJECT_ID_UNDEFINED;
}

CFE_SB_UnlockSharedData(__FILE__, __LINE__);
}
Expand Down

0 comments on commit dd2e47f

Please sign in to comment.