[PATCH] sprof: fix -Wformat warnings on 32-bit hosts

H.J. Lu hjl.tools@gmail.com
Wed Oct 22 12:21:50 GMT 2025


On Wed, Oct 22, 2025 at 4:52 PM Collin Funk <collin.funk1@gmail.com> wrote:
>
> ---
>  elf/sprof.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/elf/sprof.c b/elf/sprof.c
> index e9d2a66a4f..513e0470b2 100644
> --- a/elf/sprof.c
> +++ b/elf/sprof.c
> @@ -570,8 +570,8 @@ load_shobj (const char *name)
>         || INT_ADD_WRAPV (sz, off, &end_off)                            \
>         || end_off > st.st_size)                                        \
>        error (EXIT_FAILURE, ERANGE,                                     \
> -            _("read outside of file extents %zu + %zd > %zu"),         \
> -            sz, off, st.st_size);                                      \
> +            _("read outside of file extents %zu + %jd > %jd"),         \
> +            sz, (intmax_t) off, (intmax_t) st.st_size);                \
>         }
>
>    /* Map the section header.  */
> --
> 2.51.0
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.

-- 
H.J.


More information about the Libc-alpha mailing list