a8b71f2d90
Disable the -Wadress-of-packaed-member diagnostic for the grub_cpio_find_file function since the result is found to be false postive. Any pointers to member of the 'struct head hd' is aligned even if the structure is packed without paddings. [ 59s] In file included from ../grub-core/fs/cpio.c:51: [ 59s] ../grub-core/fs/cpio_common.c: In function 'grub_cpio_find_file': [ 59s] ../grub-core/fs/cpio_common.c:58:31: error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 59s] 58 | data->size = read_number (hd.filesize, ARRAY_SIZE (hd.filesize)); [ 59s] | ~~^~~~~~~~~ [ 59s] ../grub-core/fs/cpio_common.c:60:29: error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 59s] 60 | *mtime = read_number (hd.mtime, ARRAY_SIZE (hd.mtime)); [ 59s] | ~~^~~~~~ [ 59s] ../grub-core/fs/cpio_common.c:61:28: error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 59s] 61 | modeval = read_number (hd.mode, ARRAY_SIZE (hd.mode)); [ 59s] | ~~^~~~~ [ 59s] ../grub-core/fs/cpio_common.c:62:29: error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 59s] 62 | namesize = read_number (hd.namesize, ARRAY_SIZE (hd.namesize)); [ 59s] | ~~^~~~~~~~~ [ 59s] In file included from ../grub-core/fs/cpio_be.c:51: [ 59s] ../grub-core/fs/cpio_common.c: In function 'grub_cpio_find_file': [ 59s] ../grub-core/fs/cpio_common.c:58:31: error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 59s] 58 | data->size = read_number (hd.filesize, ARRAY_SIZE (hd.filesize)); [ 59s] | ~~^~~~~~~~~ [ 59s] ../grub-core/fs/cpio_common.c:60:29: error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 59s] 60 | *mtime = read_number (hd.mtime, ARRAY_SIZE (hd.mtime)); [ 59s] | ~~^~~~~~ [ 59s] ../grub-core/fs/cpio_common.c:61:28: error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 59s] 61 | modeval = read_number (hd.mode, ARRAY_SIZE (hd.mode)); [ 59s] | ~~^~~~~ [ 59s] ../grub-core/fs/cpio_common.c:62:29: error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 59s] 62 | namesize = read_number (hd.namesize, ARRAY_SIZE (hd.namesize)); [ 59s] | ~~^~~~~~~~~ Signed-off-by: Michael Chang <mchang@suse.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> |
||
---|---|---|
.. | ||
boot | ||
bus | ||
commands | ||
disk | ||
efiemu | ||
font | ||
fs | ||
gdb | ||
gettext | ||
gfxmenu | ||
hello | ||
hook | ||
io | ||
kern | ||
lib | ||
loader | ||
mmap | ||
net | ||
normal | ||
osdep | ||
partmap | ||
parttool | ||
script | ||
term | ||
tests | ||
video | ||
gdb_grub.in | ||
genemuinit.sh | ||
genemuinitheader.sh | ||
genmod.sh.in | ||
genmoddep.awk | ||
gensyminfo.sh.in | ||
gensymlist.sh | ||
gentrigtables.c | ||
gmodule.pl.in | ||
Makefile.am | ||
Makefile.core.def | ||
modinfo.sh.in |