Skip to content

Commit

Permalink
Fix #2552, 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 17, 2024
1 parent 505baa1 commit 0dc799d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/evs/fsw/src/cfe_evs_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ void EVS_SendViaPorts(CFE_EVS_LongEventTlm_t *EVS_PktPtr)
CFE_MSG_GetMsgTime(CFE_MSG_PTR(EVS_PktPtr->TelemetryHeader), &PktTime);
CFE_TIME_Print(TimeBuffer, PktTime);

/* SAD: No need to check snprintf return; CFE_EVS_MAX_PORT_MSG_LENGTH is sized to accommodate buffer limits */
snprintf(PortMessage, sizeof(PortMessage), "%s %u/%u/%s %u: %s", TimeBuffer,
(unsigned int)EVS_PktPtr->Payload.PacketID.SpacecraftID,
(unsigned int)EVS_PktPtr->Payload.PacketID.ProcessorID, EVS_PktPtr->Payload.PacketID.AppName,
Expand Down
1 change: 1 addition & 0 deletions modules/fs/fsw/src/cfe_fs_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ void CFE_FS_ByteSwapUint32(uint32 *Uint32ToSwapPtr)
char *InPtr = (char *)&Temp;
char *OutPtr = (char *)Uint32ToSwapPtr;

/* SAD: Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers. */
OutPtr[0] = InPtr[3];
OutPtr[1] = InPtr[2];
OutPtr[2] = InPtr[1];
Expand Down
1 change: 1 addition & 0 deletions modules/tbl/fsw/src/cfe_tbl_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ void CFE_TBL_ByteSwapUint32(uint32 *Uint32ToSwapPtr)
char *InPtr = (char *)&Temp;
char *OutPtr = (char *)Uint32ToSwapPtr;

/* SAD: Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers. */
OutPtr[0] = InPtr[3];
OutPtr[1] = InPtr[2];
OutPtr[2] = InPtr[1];
Expand Down

0 comments on commit 0dc799d

Please sign in to comment.