chiark / gitweb /
build: add -Wno-format-signedness
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 24 Feb 2015 14:59:06 +0000 (15:59 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 24 Feb 2015 15:02:32 +0000 (16:02 +0100)
gcc5 introduced this option (gcc4 silently ignores it, which is fine).
Given that gcc5 thinks 'unsigned char'/'unsigned short' is promoted to
'int' for var-args, stuff like this spits out warnings:
    uint8_t x;
    printf("%" PRIu8", x);

gcc5 promots 'x' to 'int', instead of 'unsigned int' and thus gets a
signedness-warnings as it expects an 'unsigned int'.

glibc states otherwise: unsigneds are always promoted to 'unsigned int'.
Until gcc and glibc figure this out, lets just ignore that warning (which
is totally useless in its current form).

configure.ac

index 9a2235bcf3d130d559714111bca804f75b46a8c7..22a6f17811779d637415a009376654ddbfbf1cc4 100644 (file)
@@ -186,6 +186,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Wno-unused-parameter \
         -Wno-missing-field-initializers \
         -Wno-unused-result \
+        -Wno-format-signedness \
         -Werror=overflow \
         -Wdate-time \
         -Wnested-externs \