Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/41154 )
Change subject: amdfwtool: Unpack struct `_bios_directory_entry` ......................................................................
amdfwtool: Unpack struct `_bios_directory_entry`
gcc (Debian 10-20200502-1) 10.0.1 20200502 (prerelease) [gcc-10 revision d128356d460:a9ed47dd155:0118d0397f94c307b76aa14abec99347a93da621] shows the warning below.
/coreboot/util/amdfwtool/amdfwtool.c: In function 'integrate_bios_firmwares': /dev/shm/coreboot/util/amdfwtool/amdfwtool.c:964:7: warning: taking address of packed member of 'struct _bios_directory_entry' may result in an unaligned pointer value [-Waddress-of-packed-member] 964 | &biosdir->entries[count].source, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /coreboot/util/amdfwtool/amdfwtool.c:965:7: warning: taking address of packed member of 'struct _bios_directory_entry' may result in an unaligned pointer value [-Waddress-of-packed-member] 965 | &biosdir->entries[count].size)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I375ffec589cca8fe9d07dbe908c79348e863aa13 Signed-off-by: Paul Menzel pmenzel@molgen.mpg.de --- M util/amdfwtool/amdfwtool.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/41154/1
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 1ff86e6..c4acf81 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -484,7 +484,7 @@ uint32_t size; uint64_t source; uint64_t dest; -} __attribute__((packed)) bios_directory_entry; +} bios_directory_entry;
typedef struct _bios_directory_table { bios_directory_hdr header;