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

Mike Frysinger via Gdb-patches
2022-10-23T13:34:51Z

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

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
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]