diff mbox series

efi_loader: efi_esrt: Fix the build warning for 32 bit systems

Message ID 20210408070055.27323-1-sughosh.ganu@linaro.org
State Accepted
Commit 5c3de47caa8163955b0df4761b7fb1a253aae1e8
Headers show
Series efi_loader: efi_esrt: Fix the build warning for 32 bit systems | expand

Commit Message

Sughosh Ganu April 8, 2021, 7 a.m. UTC
Fix the build warning when building for 32 bit systems by using the
length modifier for size_t.

lib/efi_loader/efi_esrt.c: In function ‘efi_esrt_populate’:
include/efi_loader.h:126:8: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 8 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>

---
 lib/efi_loader/efi_esrt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Heinrich Schuchardt April 8, 2021, 7:25 a.m. UTC | #1
On 08.04.21 09:00, Sughosh Ganu wrote:
> Fix the build warning when building for 32 bit systems by using the

> length modifier for size_t.

>

> lib/efi_loader/efi_esrt.c: In function ‘efi_esrt_populate’:

> include/efi_loader.h:126:8: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 8 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]


Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


>

> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>

> ---

>  lib/efi_loader/efi_esrt.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/lib/efi_loader/efi_esrt.c b/lib/efi_loader/efi_esrt.c

> index 947bdb5e95..8815e56e15 100644

> --- a/lib/efi_loader/efi_esrt.c

> +++ b/lib/efi_loader/efi_esrt.c

> @@ -341,7 +341,7 @@ efi_status_t efi_esrt_populate(void)

>  		return EFI_SUCCESS;

>  	}

>

> -	EFI_PRINT("ESRT populate esrt from (%ld) available FMP handles\n",

> +	EFI_PRINT("ESRT populate esrt from (%zd) available FMP handles\n",

>  		  no_handles);

>

>  	/*

>
diff mbox series

Patch

diff --git a/lib/efi_loader/efi_esrt.c b/lib/efi_loader/efi_esrt.c
index 947bdb5e95..8815e56e15 100644
--- a/lib/efi_loader/efi_esrt.c
+++ b/lib/efi_loader/efi_esrt.c
@@ -341,7 +341,7 @@  efi_status_t efi_esrt_populate(void)
 		return EFI_SUCCESS;
 	}
 
-	EFI_PRINT("ESRT populate esrt from (%ld) available FMP handles\n",
+	EFI_PRINT("ESRT populate esrt from (%zd) available FMP handles\n",
 		  no_handles);
 
 	/*