Re: [PATCH 2/5] sim/ppc: fix warnings related to printf format strings

Andrew Burgess via Gdb-patches
2022-10-24T15:41:35Z

Mike Frysinger <vapier@gentoo.org> writes:

> On 12 Oct 2022 13:38, Andrew Burgess via Gdb-patches wrote:
>> --- a/sim/ppc/igen.c
>> +++ b/sim/ppc/igen.c
>> @@ -442,7 +442,7 @@ main(int argc,
>> code |= generate_with_icache;
>> break;
>> default:
>> - error (NULL, "Expecting -Ggen-icache or -Ggen-icache=<N>\n");
>> + error ("Expecting -Ggen-icache or -Ggen-icache=<N>\n");
>
> the file is using inconsistent whitespace now
>
>> --- a/sim/ppc/ld-cache.c
>> +++ b/sim/ppc/ld-cache.c
>> @@ -88,13 +88,13 @@ static void
>> dump_cache_rule(cache_table* rule,
>> int indent)
>> {
>> - dumpf(indent, "((cache_table*)0x%x\n", rule);
>> + dumpf(indent, "((cache_table*)0x%p\n", rule);
>
> you don't want 0x with %p as %p already includes it
>
> comes up multiple times in this patch

Tsukasa OI already pointed this out:

https://sourceware.org/pipermail/gdb-patches/2022-October/192598.html

The version I pushed fixed this error.

Thanks,
Andrew