-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix #2375, Use size_t
for variables/parameters representing size
#2376
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -951,7 +951,7 @@ int32 CFE_ES_QueryAllCmd(const CFE_ES_QueryAllCmd_t *data) | |
osal_id_t FileDescriptor = OS_OBJECT_ID_UNDEFINED; | ||
uint32 i; | ||
uint32 EntryCount = 0; | ||
uint32 FileSize = 0; | ||
size_t FileSize = 0; | ||
int32 OsStatus; | ||
int32 Result; | ||
CFE_ES_AppInfo_t AppInfo; | ||
|
@@ -1088,8 +1088,8 @@ int32 CFE_ES_QueryAllCmd(const CFE_ES_QueryAllCmd_t *data) | |
OS_close(FileDescriptor); | ||
CFE_ES_Global.TaskData.CommandCounter++; | ||
CFE_EVS_SendEvent(CFE_ES_ALL_APPS_EID, CFE_EVS_EventType_DEBUG, | ||
"App Info file written to %s, Entries=%d, FileSize=%d", QueryAllFilename, (int)EntryCount, | ||
(int)FileSize); | ||
"App Info file written to %s, Entries=%d, FileSize=%lu", QueryAllFilename, (int)EntryCount, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Problem is not all "c99" compilers recognize %zu yet.... Once we update to C11 then we should be able to use the z modifier. For now I prefer to keep the cast to unsigned long. |
||
(unsigned long)FileSize); | ||
} | ||
else | ||
{ | ||
|
@@ -1111,7 +1111,7 @@ int32 CFE_ES_QueryAllTasksCmd(const CFE_ES_QueryAllTasksCmd_t *data) | |
osal_id_t FileDescriptor = OS_OBJECT_ID_UNDEFINED; | ||
uint32 i; | ||
uint32 EntryCount = 0; | ||
uint32 FileSize = 0; | ||
size_t FileSize = 0; | ||
int32 OsStatus; | ||
int32 Result; | ||
CFE_ES_TaskInfo_t TaskInfo; | ||
|
@@ -1240,8 +1240,8 @@ int32 CFE_ES_QueryAllTasksCmd(const CFE_ES_QueryAllTasksCmd_t *data) | |
OS_close(FileDescriptor); | ||
CFE_ES_Global.TaskData.CommandCounter++; | ||
CFE_EVS_SendEvent(CFE_ES_TASKINFO_EID, CFE_EVS_EventType_DEBUG, | ||
"Task Info file written to %s, Entries=%d, FileSize=%d", QueryAllFilename, (int)EntryCount, | ||
(int)FileSize); | ||
"Task Info file written to %s, Entries=%d, FileSize=%lu", QueryAllFilename, (int)EntryCount, | ||
(unsigned long)FileSize); | ||
} | ||
else | ||
{ | ||
|
Check notice
Code scanning / CodeQL
Long function without assertion