summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2023-05-11 19:40:35 +0300
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-05-13 11:09:51 +0200
commit7dfab39855897418c05ccb6f4213c840f91d1c30 (patch)
tree44bbe49c4fa81c5b4ea94a93140883efbef00874 /lib
parent227d3b3e0af02918592dda19aefa379e9ea20887 (diff)
downloadu-boot-7dfab39855897418c05ccb6f4213c840f91d1c30.tar.gz
efi_loader: Fix warnings for unaligned accesses
Tom reports that when building with clang we see this warning: field guid within 'struct efi_hii_keyboard_layout' is less aligned than 'efi_guid_t' and is usually due to 'struct efi_hii_keyboard_layout' being packed, which can lead to unaligned accesses [-Wunaligned-access] This happens because 'struct efi_hii_keyboard_layout' is defined as packed and thus has 1-byte alignment but efi_guid_t is a type that requires greater alignment than that. However the EFI spec describes the EFI_GUID as "128-bit buffer containing a unique identifier value. Unless otherwise specified" So convert the efi_guid_t -> u8 b[16] here and skip the alignment requirements. Since the struct is packed to begin with, it makes no difference on the final memory layout. Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions