From: Tom Rini Date: Thu, 6 Nov 2025 23:28:39 +0000 (-0600) Subject: efi_selftest: efi_selftest_snp: Fix warning when building with clang X-Git-Tag: v2026.01-rc3~15^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8f2614ecaca83b381a92af54e5e38eefaf7646f;p=thirdparty%2Fu-boot.git efi_selftest: efi_selftest_snp: Fix warning when building with clang When building with clang, we see a warning: lib/efi_selftest/efi_selftest_snp.c:63:18: error: field dhcp_hdr within 'struct dhcp' is less aligned than 'struct dhcp_hdr' and is usually due to 'struct dhcp' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] when building lib/efi_selftest/efi_selftest_snp.c. Resolve this error by packing struct dhcp_hdr as well, as the only place it is used also is packed. Signed-off-by: Tom Rini Reviewed-by: Ilias Apalodimas --- diff --git a/lib/efi_selftest/efi_selftest_snp.c b/lib/efi_selftest/efi_selftest_snp.c index b00c76c2f17..290ed3a28f2 100644 --- a/lib/efi_selftest/efi_selftest_snp.c +++ b/lib/efi_selftest/efi_selftest_snp.c @@ -43,7 +43,7 @@ struct dhcp_hdr { u8 chaddr[16]; u8 sname[64]; u8 file[128]; -}; +} __packed; /* * Message type option.