On 16 March 2012 14:37, Stefan Weil <s...@weilnetz.de> wrote: >> fprintf(stderr, >> - "qxl: %s: error: current_async = %d != %ld = >> cookie->io\n", >> + "qxl: %s: error: current_async = %d != %" PRId64 " = >> cookie->io\n", >> __func__, current_async, cookie->io); >> > > > current_async is uint32_t, so maybe you can also replace %d by %" PRIu32 ". > Is io unsigned (I don't have the headers, but think it is)? Then PRIu64 > would be better.
Yes, cookie->io is uint64_t, but I just want to fix compile warnings, not make functional changes (it might be a semantically signed value that we happen to be carrying in an unsigned type, for instance). I agree that we could use PRId32 in theory, but on the other hand it doesn't cause any compiler warnings and we also use %d for it elsewhere in the function. I'd rather leave that kind of cleanup for somebody who wants to deal with it more systematically. -- PMM