Skip to content

Commit

Permalink
Merge pull request #2585 from tandharia:fix-2582-uint-casting
Browse files Browse the repository at this point in the history
Fix #2582, Cast to unsigned int
  • Loading branch information
dzbaker committed Aug 2, 2024
2 parents 8244c18 + 66d44f5 commit 481109e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/msg/fsw/src/cfe_msg_sechdr_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ CFE_Status_t CFE_MSG_GetMsgTime(const CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTim
}

/* Get big endian time fields with default 32/16 layout */
Time->Subseconds = (tlm->Sec.Time[4] << 24) + (tlm->Sec.Time[5] << 16);
Time->Seconds = (tlm->Sec.Time[0] << 24) + (tlm->Sec.Time[1] << 16) + (tlm->Sec.Time[2] << 8) + tlm->Sec.Time[3];
Time->Subseconds = ((uint32)tlm->Sec.Time[4] << 24) + ((uint32)tlm->Sec.Time[5] << 16);
Time->Seconds = ((uint32)tlm->Sec.Time[0] << 24) + ((uint32)tlm->Sec.Time[1] << 16) + ((uint32)tlm->Sec.Time[2] << 8) + (uint32)tlm->Sec.Time[3];

return CFE_SUCCESS;
}

0 comments on commit 481109e

Please sign in to comment.