Den 2008-10-31 16:35, skrev Eric Blake:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Peter Rosin on 10/31/2008 9:19 AM:
>> main(void)
>> {
>>     int32_t i = 32;
>>     printf("%d", i);
>>     return 0;
>> }
>> $ gcc -c -Wall int.c
>> int.c: In function `main':
>> int.c:6: warning: int format, int32_t arg (arg 2)
>> int.c:6: warning: int format, int32_t arg (arg 2)
>>
>> What should the format specifier be to not have that warning
>> on neither Cygwin nor Linux? (or anywhere for that matter)
>
> http://www.opengroup.org/onlinepubs/009695399/basedefs/inttypes.h.html#tag_13_20
>
> #include <inttypes.h>
>
> int32_t i;
> printf("%"PRId32"\n",i);

Thank you! Exactly what I was looking for.

Cheers,
Peter


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to