Skip to content

Commit

Permalink
Merge pull request nasa#117 from jphickey/fix-116-formatspecs
Browse files Browse the repository at this point in the history
Fix nasa#116, correct format spec strings and types
  • Loading branch information
dzbaker authored Jan 11, 2024
2 parents 312aa74 + 3f91d94 commit 216108e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fsw/src/hs_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ CFE_Status_t HS_AppInit(void)
if (Status != CFE_SUCCESS)
{
CFE_EVS_SendEvent(HS_SYSMON_INIT_ERR_EID, CFE_EVS_EventType_ERROR,
"Error in system monitor initialization, RC=0x%08X", Status);
"Error in system monitor initialization, RC=0x%08X", (unsigned int)Status);
return Status;
}

Expand Down
2 changes: 1 addition & 1 deletion fsw/src/hs_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ CFE_Status_t HS_SendHkCmd(const HS_SendHkCmd_t *BufPtr)
/* ExeCount remains HS_INVALID_EXECOUNT */
CFE_EVS_SendEvent(HS_HKREQ_RESOURCE_DBG_EID, CFE_EVS_EventType_DEBUG,
"Housekeeping req found unknown resource. Type=0x%08X",
HS_AppData.XCTablePtr[TableIndex].ResourceType);
(unsigned int)HS_AppData.XCTablePtr[TableIndex].ResourceType);
break;
} /* end ResourceType switch statement */
} /* end ExeCountState if statement */
Expand Down
6 changes: 2 additions & 4 deletions unit-test/hs_monitors_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void HS_MonitorApplications_Test_ProcessorResetError(void)
/* Verify results */
UtAssert_True(HS_AppData.AppMonCheckInCountdown[0] == 0, "HS_AppData.AppMonCheckInCountdown[0] == 0 %u",
HS_AppData.AppMonCheckInCountdown[0]);
UtAssert_True(HS_AppData.AppMonEnables[0] == 0, "HS_AppData.AppMonEnables[0] == 0 %u", HS_AppData.AppMonEnables[0]);
UtAssert_UINT32_EQ(HS_AppData.AppMonEnables[0], 0);
UtAssert_True(HS_AppData.ServiceWatchdogFlag == HS_STATE_DISABLED,
"HS_AppData.ServiceWatchdogFlag == HS_STATE_DISABLED");

Expand Down Expand Up @@ -1690,9 +1690,7 @@ void HS_MonitorUtilization_Test_HighCurrentUtil(void)
HS_MonitorUtilization();

/* Verify results */
UtAssert_True(HS_AppData.UtilizationTracker[HS_AppData.CurrentCPUUtilIndex - 1] == HS_CPU_UTILIZATION_MAX,
"HS_AppData.UtilizationTracker[HS_AppData.CurrentCPUUtilIndex - 1] == HS_CPU_UTILIZATION_MAX %u %u",
HS_AppData.UtilizationTracker[HS_AppData.CurrentCPUUtilIndex - 1], HS_CPU_UTILIZATION_MAX);
UtAssert_INT32_EQ(HS_AppData.UtilizationTracker[HS_AppData.CurrentCPUUtilIndex - 1], HS_CPU_UTILIZATION_MAX);
/* For this test case, we don't care about any messages or variables changed after this is set */

call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
Expand Down

0 comments on commit 216108e

Please sign in to comment.