https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65446
Eric Blake <eblake at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eblake at redhat dot com --- Comment #2 from Eric Blake <eblake at redhat dot com> --- 'unsigned short' promotes to 'int', not 'unsigned int', when passed through var-args. The warning is technically correct, but annoying, since all values of 'unsigned short' are representable in both 'int' and in 'unsigned int', therefore %d vs. %u won't ever have to deal with a negative value. "%u" with signed 'short' should indeed warn, because that is a case where promotion to 'int' differs from printing unsigned values. "%x" with 1 should indeed warn, because that is passing 'int'. Use "%x" with 1U if you want to avoid the warning.