Mark Kettenis <mark.kette...@xs4all.nl> writes:

>> From: Eric Anholt <e...@anholt.net>
>> Date: Mon, 27 Jan 2014 11:36:09 -0800
>> 
>> We all know that XIDs are 32 bits, even if 32-bit headers call them
>> "long".
>> ---
>>  test/hashtabletest.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/test/hashtabletest.c b/test/hashtabletest.c
>> index ceadfa7..a37dfb5 100644
>> --- a/test/hashtabletest.c
>> +++ b/test/hashtabletest.c
>> @@ -12,7 +12,7 @@ static void
>>  print_xid(void* ptr, void* v)
>>  {
>>      XID *x = v;
>> -    printf("%ld", *x);
>> +    printf("%d", (uint32_t)*x);
>>  }
>
> There is no guarantee that uint32_t isn't long either!  And of course
> using %d to print an unsigned integer isn't quite right either.

That's super pedantic.  Do you know of a platform where that's the
case?

Regardless, I've changed it to cast to int.

Attachment: pgpKf9BtOsne9.pgp
Description: PGP signature

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to