Skip to content

Commit

Permalink
Merge pull request #135 from jphickey/fix-134-format-specs
Browse files Browse the repository at this point in the history
Fix #134, correct format spec strings and data types
  • Loading branch information
dzbaker authored Jan 11, 2024
2 parents 20ec50d + 8b18758 commit cc1ffcb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
5 changes: 3 additions & 2 deletions fsw/src/sc_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,8 @@ void SC_LoadDefaultTables(void)

/* send an event for each failed load */
CFE_EVS_SendEvent(SC_RTS_LOAD_FAIL_DBG_EID, CFE_EVS_EventType_DEBUG,
"RTS table %d failed to load, returned: 0x%08X", (int)RtsIndex, Status);
"RTS table %d failed to load, returned: 0x%08lX", (int)RtsIndex,
(unsigned long)Status);
}
}
else
Expand All @@ -575,7 +576,7 @@ void SC_LoadDefaultTables(void)

/* send an event for each failed open */
CFE_EVS_SendEvent(SC_RTS_OPEN_FAIL_DBG_EID, CFE_EVS_EventType_DEBUG,
"RTS table %d file open failed, returned: 0x%08X", (int)RtsIndex, Status);
"RTS table %d file open failed, returned: 0x%08lX", (int)RtsIndex, (unsigned long)Status);
}
}

Expand Down
4 changes: 2 additions & 2 deletions fsw/src/sc_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ void SC_ManageRtsTable(int32 ArrayIndex)
if (ArrayIndex >= SC_NUMBER_OF_RTS)
{
CFE_EVS_SendEvent(SC_TABLE_MANAGE_RTS_INV_INDEX_ERR_EID, CFE_EVS_EventType_ERROR,
"RTS table manage error: invalid RTS index %d", ArrayIndex);
"RTS table manage error: invalid RTS index %d", (int)ArrayIndex);
return;
}

Expand All @@ -689,7 +689,7 @@ void SC_ManageAtsTable(int32 ArrayIndex)
if (ArrayIndex >= SC_NUMBER_OF_ATS)
{
CFE_EVS_SendEvent(SC_TABLE_MANAGE_ATS_INV_INDEX_ERR_EID, CFE_EVS_EventType_ERROR,
"ATS table manage error: invalid ATS index %d", ArrayIndex);
"ATS table manage error: invalid ATS index %d", (int)ArrayIndex);
return;
}

Expand Down
9 changes: 4 additions & 5 deletions unit-test/sc_atsrq_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,14 @@
* Function Definitions
*/

CFE_TIME_Compare_t UT_SC_StartAtsRq_CompareHookAgreaterthanB(void *UserObj, int32 StubRetcode, uint32 CallCount,
const UT_StubContext_t *Context)
int32 UT_SC_StartAtsRq_CompareHookAgreaterthanB(void *UserObj, int32 StubRetcode, uint32 CallCount,
const UT_StubContext_t *Context)
{
return CFE_TIME_A_GT_B;
}

uint8 UT_SC_StartAtsRq_CompareHookRunCount;
CFE_TIME_Compare_t UT_SC_StartAtsRq_CompareHook3(void *UserObj, int32 StubRetcode, uint32 CallCount,
const UT_StubContext_t *Context)
uint8 UT_SC_StartAtsRq_CompareHookRunCount;
int32 UT_SC_StartAtsRq_CompareHook3(void *UserObj, int32 StubRetcode, uint32 CallCount, const UT_StubContext_t *Context)
{
if (UT_SC_StartAtsRq_CompareHookRunCount == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions unit-test/sc_cmds_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
* Function Definitions
*/

CFE_TIME_Compare_t Ut_CFE_TIME_CompareHookAlessthanB(void *UserObj, int32 StubRetcode, uint32 CallCount,
const UT_StubContext_t *Context)
int32 Ut_CFE_TIME_CompareHookAlessthanB(void *UserObj, int32 StubRetcode, uint32 CallCount,
const UT_StubContext_t *Context)
{
return CFE_TIME_A_LT_B;
}
Expand Down

0 comments on commit cc1ffcb

Please sign in to comment.