Skip to content

Commit

Permalink
Fix #140, Adds JSC 2.1 Static Analysis comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jdfiguer authored and jdfiguer committed Jun 10, 2024
1 parent 1805d10 commit 89b6894
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fsw/src/sc_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ CFE_Status_t SC_AppInit(void)

/* Make sure nothing is running */
SC_AppData.NextProcNumber = SC_Process_NONE;
/* SAD: SC_Process_ATP is 0, within the valid index range of NextCmdTime array, which has 2 elements */
SC_AppData.NextCmdTime[SC_Process_ATP] = SC_MAX_TIME;
/* SAD: SC_Process_RTP is 1, within the valid index range of NextCmdTime array, which has 2 elements */
SC_AppData.NextCmdTime[SC_Process_RTP] = SC_MAX_TIME;

/* Initialize the SC housekeeping packet */
Expand Down Expand Up @@ -364,6 +366,7 @@ CFE_Status_t SC_RegisterDumpOnlyTables(void)
/* Register dump only ATS command status tables */
for (i = 0; i < SC_NUMBER_OF_ATS; i++)
{
/* SAD: No need to check snprintf return value; TableName's buffer is large enough to safely hold SC_ATS_CMD_STAT_TABLE_NAME with the added index */
snprintf(TableName, CFE_MISSION_TBL_MAX_NAME_LENGTH, "%s%d", SC_ATS_CMD_STAT_TABLE_NAME, i + 1);
Result = CFE_TBL_Register(&SC_OperData.AtsCmdStatusHandle[i], TableName, SC_MAX_ATS_CMDS * sizeof(uint32),
TableOptions, NULL);
Expand Down Expand Up @@ -401,6 +404,7 @@ CFE_Status_t SC_RegisterLoadableTables(void)
{
for (j = 0; j < NumTables[i]; j++)
{
/* SAD: No need to check snprintf return value; TableName's buffer is large enough to safely hold CFE_MISSION_TBL_MAX_NAME_LENGTH with the added table identifiers */
snprintf(TableName, CFE_MISSION_TBL_MAX_NAME_LENGTH, StrFormat[i], Name[i], j + 1);
Result = CFE_TBL_Register(&TblHandlePtr[i][j], TableName, TableSize[i], TableOptions[i],
TblValidationFuncPtr[i]);
Expand Down

0 comments on commit 89b6894

Please sign in to comment.