[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %lx vs % PRIx64
From: |
Jose E. Marchesi |
Subject: |
Re: %lx vs % PRIx64 |
Date: |
Mon, 07 Feb 2022 21:58:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Jose E. Marchesi wrote:
>> 2022-02-05 Jose E. Marchesi <jemarch@gnu.org>
>>
>> * poke/pk-cmd-def.c (PREP_REGEXP_PAYLOAD): Avoid using `regexp'
>> uninitialized.
>> * poke/pk-cmd-ios.c (pk_cmd_sub): Use PRIx64 instead of %lx.
>> (print_info_ios): Likewise.
>> (print_info_ios): Likewise.
>
> In 2.0.92, i.e. with this change included, I get similar warnings on
> Linux/sparc64 in 32-bit mode:
Hrm thats because I didn't address all the occurrences of the format
tags... must be fixed now.
>
> ../../poke/pk-cmd-ios.c:91:27: warning: format '%lx' expects argument
> of type 'long unsigned int', but argument 5 has type 'uint64_t' {aka
> 'long long unsigned int'} [-Wformat=]
> ../../poke/pk-cmd-ios.c:125:36: warning: format '%ld' expects argument
> of type 'long int', but argument 3 has type 'uint64_t' {aka 'long long
> unsigned int'} [-Wformat=]
> ../../poke/pk-ios.c:209:51: warning: format '%lx' expects argument of
> type 'long unsigned int', but argument 4 has type 'uint64_t' {aka
> 'long long unsigned int'} [-Wformat=]
> ../../poke/pk-ios.c:209:57: warning: format '%lx' expects argument of
> type 'long unsigned int', but argument 5 has type 'uint64_t' {aka
> 'long long unsigned int'} [-Wformat=]
>
> And similarly on Linux/mips in 32-bit and n32 ABIs (just the line numbers
> differ):
>
> ../../poke/pk-cmd-ios.c:92:17: warning: format '%lx' expects argument
> of type 'long unsigned int', but argument 5 has type 'uint64_t'
> [-Wformat=]
> ../../poke/pk-cmd-ios.c:125:3: warning: format '%ld' expects argument
> of type 'long int', but argument 3 has type 'uint64_t' [-Wformat=]
> ../../poke/pk-ios.c:212:27: warning: format '%lx' expects argument of
> type 'long unsigned int', but argument 4 has type 'uint64_t'
> [-Wformat=]
> ../../poke/pk-ios.c:212:27: warning: format '%lx' expects argument of
> type 'long unsigned int', but argument 5 has type 'uint64_t'
> [-Wformat=]
>
> The first of these warnings is in the line you just changed.
- Re: GNU poke 2.0.91 pre-released in alpha.gnu.org, (continued)
- Re: GNU poke 2.0.91 pre-released in alpha.gnu.org, Bruno Haible, 2022/02/04
- Re: GNU poke 2.0.91 pre-released in alpha.gnu.org, Bruno Haible, 2022/02/04
- Re: GNU poke 2.0.91 pre-released in alpha.gnu.org, Bruno Haible, 2022/02/04
- Re: GNU poke 2.0.91 pre-released in alpha.gnu.org, Bruno Haible, 2022/02/05
- Re: GNU poke 2.0.91 pre-released in alpha.gnu.org, Bruno Haible, 2022/02/06
- Re: GNU poke 2.0.91 pre-released in alpha.gnu.org, Bruno Haible, 2022/02/06