diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-07-07 07:23:44 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-07-11 23:14:16 +0200 |
commit | 39a75f5af139eaa53758a8cb0e0788cfafdaf54c (patch) | |
tree | b9d11dc655f2e30c448c0d3a8bb2891f772a48ed /lib | |
parent | ecb833a0c623172cf72e1c6dda9e6362c30d5a86 (diff) | |
download | u-boot-39a75f5af139eaa53758a8cb0e0788cfafdaf54c.tar.gz u-boot-39a75f5af139eaa53758a8cb0e0788cfafdaf54c.tar.xz u-boot-39a75f5af139eaa53758a8cb0e0788cfafdaf54c.zip |
efi_loader: wrong printf format in efi_image_parse
Commit 1b6c08548c85 ("efi_loader: image_loader: replace debug to
EFI_PRINT") leads to a build warning on 32bit systems:
lib/efi_loader/efi_image_loader.c: In function ‘efi_image_parse’:
include/efi_loader.h:123:8: warning: format ‘%lu’ expects argument
of type ‘long unsigned int’, but argument 8 has
type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
Use %zu for printing size_t.
Fixes: 1b6c08548c85 ("efi_loader: image_loader: replace debug to
EFI_PRINT")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_image_loader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c index b7cf26046e..fef0bb870c 100644 --- a/lib/efi_loader/efi_image_loader.c +++ b/lib/efi_loader/efi_image_loader.c @@ -382,7 +382,7 @@ bool efi_image_parse(void *efi, size_t len, struct efi_image_regions **regp, /* 3. Extra data excluding Certificates Table */ if (bytes_hashed + authsz < len) { - EFI_PRINT("extra data for hash: %lu\n", + EFI_PRINT("extra data for hash: %zu\n", len - (bytes_hashed + authsz)); efi_image_region_add(regs, efi + bytes_hashed, efi + len - authsz, 0); |