25 Aug
2006
25 Aug
'06
9:18 p.m.
On 8/25/06, Alexandre Julliard <julliard(a)winehq.org> wrote:
Just so I know, what is the warning? Does sizeof() return a 64-bit integer on those platforms?
Not on 32-bit platforms, but it's defined as long instead of int so we still get a printf format warning.
The incredibly ugly solution I've used in the past is // printf macros for size_t, in the style of inttypes.h #ifdef _LP64 #define __PRIS_PREFIX "z" #else #define __PRIS_PREFIX #endif #define PRIuS __PRIS_PREFIX "u" and then printf("size is %" PRIuS "\n", sizeof(foo)); Much nicer just to avoid using size_t in printf's if you can. - Dan