grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] devmapper: Fix build error on 32bit host


From: Daniel Kiper
Subject: Re: [PATCH] devmapper: Fix build error on 32bit host
Date: Wed, 1 Mar 2023 14:16:43 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Wed, Mar 01, 2023 at 05:23:08PM +0800, Michael Chang via Grub-devel wrote:
> The gcc build has failed for 32bit host (for eg, i386-emu and arm-emu)
> due to mismatch between format specifier and data type.
>
> ../grub-core/osdep/devmapper/getroot.c: In function
> 'grub_util_pull_devmapper':
>
> ../grub-core/osdep/devmapper/getroot.c:265:75: error: format '%lu'
> expects argument of type 'long unsigned int', but argument 2 has type
> 'int' [-Werror=format=]
>
> ../grub-core/osdep/devmapper/getroot.c:276:80: error: format '%lu'
> expects argument of type 'long unsigned int', but argument 2 has type
> 'int' [-Werror=format=]
>
> This patch fixes the problem by casting the type of calculated offset to
> grub_size_t and use platform PRIuGRUB_SIZE as format specifier.
>
> Signed-off-by: Michael Chang <mchang@suse.com>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]