ISO C forbids an empty translation unit again
Marco Bodrato
bodrato at mail.dm.unipi.it
Fri Sep 6 17:54:21 UTC 2019
Ciao,
Il Lun, 2 Settembre 2019 11:48 pm, Dennis Clarke ha scritto:
> t-get_str.c +69:30: error: format specifies type 'void *' but the
> argument has type 'const char *' [-Werror,-Wformat-pedantic]
> printf (" want %p\n", want);
> ~~ ^~~~
> %s
> I know that is silly pedantic so I tossed in a (void *) cast and life
> goes onwards.
Silly, you are right. But serendipity spots a true oversight :-)
The line is inside the branch
if (str != ret)
So, the correct line is
printf (" want %p\n", str);
or, to be pedantic,
printf (" want %p\n", (void *) str);
Corrected this too:
https://gmplib.org/repo/gmp/rev/6137ad9f35b7
Ĝis,
m
--
http://bodrato.it/papers/
More information about the gmp-bugs
mailing list