[PATCH] tools: mips-relocs: replace format string introducers

Tom Rini trini at konsulko.com
Wed Jul 30 19:18:37 CEST 2025


On Tue, 22 Jul 2025 15:57:17 +0200, Justin Swartz wrote:

> The statement that prints the ELF object type value assumes that "%lx"
> (long unsigned int, hexadecimal) is suitable for printing a uint64_t
> typed value. While this may seem to work for some machines, ie. amd64,
> it isn't ideal on a 32-bit system, such as x86 where uint64_t is likely
> to be equivalent to a long long unsigned int, as indicated by:
> 
>   ../tools/mips-relocs.c:275:34:
>   warning: format '%lx' expects argument of type 'long unsigned int',
>            but argument 2 has type 'uint64_t'
>            {aka 'long long unsigned int'} [-Wformat=]
>   275 |                 printf("type 0x%lx\n", ehdr_field(e_type));
>       |                                ~~^
>       |                                  |
>       |                                  long unsigned int
>       |                                %llx
> 
> [...]

Applied to u-boot/master, thanks!

[1/1] tools: mips-relocs: replace format string introducers
      commit: bb04b7bcf66e5d00a7abdf5c9a76026aa120e0df
-- 
Tom




More information about the U-Boot mailing list