Hi, On Mon, Apr 18, 2011 at 09:26:54AM +0200, Mark Kettenis wrote: > > resource.c: In function 'AddResource': > > resource.c:493:3: warning: format '%lx' expects type 'long unsigned int', > > but argument 3 has type 'RESTYPE' > > > > RESTYPE is uint32_t, not long. > > Well, uint32_t isn't a fundamental type. And while the most natural > thing on ILP32 and LP64 systems is to typedef it as unsigned int, it > may actually be unsigned long on some systems. It probably is on Windows.
Right. So, glibc supports PRIu32 and friends in stdint.h so you can do
this:
uint32_t foo = 0xabcdef01;
printf("uint32_t: %"PRIu32"\n", foo);
But it's non-portable, and also seriously ugly. Oh well.
Anyway, given that this quashes the warning on the most common
development platform:
Reviewed-by: Daniel Stone <[email protected]>
Cheers,
Daniel
signature.asc
Description: Digital signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
