Skip to content

Commit

Permalink
Fix #1332, Resolve compiler warnings re. signedness comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Apr 19, 2024
1 parent 28a5820 commit 235eade
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/es/fsw/src/cfe_es_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ CFE_Status_t CFE_ES_WaitForSystemState(uint32 MinSystemState, uint32 TimeOutMill
* to be at least the state requested.
*/
WaitRemaining = TimeOutMilliseconds;
while (CFE_ES_Global.SystemState < MinSystemState)
while (CFE_ES_Global.SystemState < (int)MinSystemState)
{
/* TBD: Very Crude timing here, but not sure if it matters,
* as this is only done during startup, not real work */
Expand Down
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 @@ -1033,7 +1033,7 @@ bool CFE_ES_RunAppTableScan(uint32 ElapsedTime, void *Arg)
* Decrement the wait timer, if active.
* When the timeout value becomes zero, take the action to delete/restart/reload the app
*/
if (AppPtr->ControlReq.AppTimerMsec > ElapsedTime)
if (AppPtr->ControlReq.AppTimerMsec > (int64_t)ElapsedTime)
{
AppPtr->ControlReq.AppTimerMsec -= ElapsedTime;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/es/fsw/src/cfe_es_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ bool CFE_ES_RunPerfLogDump(uint32 ElapsedTime, void *Arg)

if (BlockSize != 0)
{
if (Status != BlockSize)
if (Status != (int)BlockSize)
{
CFE_ES_FileWriteByteCntErr(State->DataFileName, BlockSize, Status);

Expand Down
4 changes: 2 additions & 2 deletions modules/fs/fsw/src/cfe_fs_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ int32 CFE_FS_ParseInputFileName(char *OutputBuffer, const char *InputName, size_
CFE_Status_t CFE_FS_ExtractFilenameFromPath(const char *OriginalPath, char *FileNameOnly)
{
uint32 i, j;
int StringLength;
size_t StringLength;
int DirMarkIdx;
int32 ReturnCode;

Expand Down Expand Up @@ -770,7 +770,7 @@ bool CFE_FS_RunBackgroundFileDump(uint32 ElapsedTime, void *Arg)
*/
OsStatus = OS_write(State->Fd, RecordPtr, RecordSize);

if (OsStatus != RecordSize)
if (OsStatus != (int64_t)RecordSize)
{
/* end the file early (cannot set "IsEOF" as this would cause the complete event to be generated too) */
OS_close(State->Fd);
Expand Down
2 changes: 1 addition & 1 deletion modules/tbl/fsw/src/cfe_tbl_task_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ CFE_TBL_CmdProcRet_t CFE_TBL_DumpToFile(const char *DumpFilename, const char *Ta
/* Output the active table image data to the dump file */
OsStatus = OS_write(FileDescriptor, DumpDataAddr, TblSizeInBytes);

if ((long)OsStatus == TblSizeInBytes)
if ((long)OsStatus == (int64_t)TblSizeInBytes)
{
if (FileExistedPrev)
{
Expand Down

0 comments on commit 235eade

Please sign in to comment.