On 11/11/2015 08:35 AM, Kevin Wolf wrote: >> Also some warnings: >> >> /Users/pm215/src/qemu-for-merges/qemu-io-cmds.c:772:56: warning: >> format specifies type 'size_t' (aka 'unsigned long') but the argument >> has type 'unsigned long lo >> ng' [-Wformat] >> printf("length cannot exceed %zu, given %s\n", SIZE_MAX, >> argv[optind]); >> ~~~ ^~~~~~~~ >> %llu >> /usr/include/stdint.h:153:20: note: expanded from macro 'SIZE_MAX' >> #define SIZE_MAX UINT64_MAX >> ^~~~~~~~~~ >> /usr/include/stdint.h:87:27: note: expanded from macro 'UINT64_MAX' >> #define UINT64_MAX 18446744073709551615ULL >> ^~~~~~~~~~~~~~~~~~~~~~~ > > Isn't that actually a bug in the system headers? If I understand the > spec correctly, SIZE_MAX should be size_t. ("this expression shall have > the same type as would an expression that is an object of the > corresponding type converted according to the integer promotions.")
You are correct; the system headers are buggy. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature