From 4842063c76bd0b97342daed76a4fdb672e8a682c Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Sat, 27 May 2023 21:16:11 +1000 Subject: [PATCH] Fix #104, Make padding explicit in `FM_MonitorReportEntry_t` & `FM_ChildQueueEntry_t` --- fsw/inc/fm_msg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fsw/inc/fm_msg.h b/fsw/inc/fm_msg.h index c764981..6d942be 100644 --- a/fsw/inc/fm_msg.h +++ b/fsw/inc/fm_msg.h @@ -512,6 +512,7 @@ typedef struct typedef struct { uint8 ReportType; + uint8 Padding[7]; /**< \brief Padding to align Name (and subsequent members) to 64-bit boundaries */ char Name[OS_MAX_PATH_LEN]; /**< \brief File system name */ uint64 Blocks; /**< \brief Block count from last check/poll, 0 if unknown */ uint64 Bytes; /**< \brief Byte count from last check/poll, 0 if unknown */ @@ -656,6 +657,7 @@ typedef struct typedef struct { CFE_MSG_FcnCode_t CommandCode; /**< \brief Command code - identifies the command */ + uint16 Padding1; /**< \brief Structure padding to align to 32-bit boundaries */ uint32 DirListOffset; /**< \brief Starting entry for dir list commands */ uint32 FileInfoState; /**< \brief File info state */ uint32 FileInfoSize; /**< \brief File info size */ @@ -665,6 +667,7 @@ typedef struct char Source2[OS_MAX_PATH_LEN]; /**< \brief Second source filename command argument */ char Target[OS_MAX_PATH_LEN]; /**< \brief Target filename command argument */ uint8 GetSizeTimeMode; /**< \brief Whether to invoke stat call for size and time (CPU intensive) */ + uint8 Padding2[3]; /**< \brief Structure padding to align to 32-bit boundaries */ uint32 Mode; /**< \brief File Mode */ } FM_ChildQueueEntry_t;