On Mon, Oct 2, 2023 at 5:45 AM Chang, Abner <abner.ch...@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> > -----Original Message-----
> > From: Mike Maslenkin <mike.maslen...@gmail.com>
> > Sent: Saturday, September 30, 2023 5:59 AM
> > To: devel@edk2.groups.io
> > Cc: Chang, Abner <abner.ch...@amd.com>; nick...@nvidia.com;
> > ig...@ami.com; Mike Maslenkin <mike.maslen...@gmail.com>
> > Subject: [PATCH 8/9] RedfishClientPkg: fix pragma pack usage
> >
> > Caution: This message originated from an External Source. Use proper caution
> > when opening attachments, clicking links, or responding.
> >
> >
> > Signed-off-by: Mike Maslenkin <mike.maslen...@gmail.com>
> > ---
> >  RedfishClientPkg/HiiToRedfishBiosDxe/HiiToRedfishBiosData.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/RedfishClientPkg/HiiToRedfishBiosDxe/HiiToRedfishBiosData.h
> > b/RedfishClientPkg/HiiToRedfishBiosDxe/HiiToRedfishBiosData.h
> > index 7e1bc9cefbac..9d5b10a7e909 100644
> > --- a/RedfishClientPkg/HiiToRedfishBiosDxe/HiiToRedfishBiosData.h
> > +++ b/RedfishClientPkg/HiiToRedfishBiosDxe/HiiToRedfishBiosData.h
> > @@ -31,7 +31,7 @@ extern EFI_GUID  gHiiToRedfishBiosFormsetGuid;
> >  #define ID_STRING_MAX                  15
> >
> >  #define ID_STRING_MAX_WITH_TERMINATOR  16
> >
> >
> >
> > -#pragma pack()
> >
> > +#pragma pack(1)
> Do we need pack(1) for this structure? We can remove  pack directive if we 
> don't need to have packed structure members. @nick...@nvidia.com, could you 
> please confirm this?
>
> Thanks
> Abner
>
>
> >
> >
> >
> >  //
> >
> >  // Definiton of HII_TO_REDFISH_BIOS_VARSTORE_DATA
> >
> > @@ -44,4 +44,5 @@ typedef struct {
> >    UINT8     Reserved;
> >
> >  } HII_TO_REDFISH_BIOS_EFI_VARSTORE_DATA;
> >
> >
> >
> > +#pragma pack()
> >
> >  #endif
> >
> > --
> > 2.32.0 (Apple Git-132)
>

This structure is stored in EFI variables, so it can be consumed by
code built by another compiler.
And this structure does not have natural alignment of its fields.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109253): https://edk2.groups.io/g/devel/message/109253
Mute This Topic: https://groups.io/mt/101667468/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to