From: Daniel P. Berrange Date: Thu, 15 Jun 2017 13:22:54 +0000 (+0100) Subject: Temporarily disable format truncation warnings X-Git-Tag: v3.5.0-rc1~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1acc4130c4d9a15fcf327f02cfc42de7eca52ff;p=thirdparty%2Flibvirt.git Temporarily disable format truncation warnings GCC 7.1 introduces a new -Wformat-truncation warning flag that reports if it thinks the maximum possible size of the formatted output will exceed the provided fixed buffer. This is enabled automatically by the -Wformat warning flag. There are quite a few places hit by this in libvirt which need rewriting. This is non-trivial work in some places, so temporarily disable the new warning until those fixes can be implemented. Signed-off-by: Daniel P. Berrange --- diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index d7bb172f32..fa0940fc68 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -169,6 +169,10 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ wantwarn="$wantwarn -Wno-format" fi + # -Wformat enables this by default, and we should keep it, + # but need to rewrite various areas of code first + wantwarn="$wantwarn -Wno-format-truncation" + # This should be < 256 really. Currently we're down to 4096, # but using 1024 bytes sized buffers (mostly for virStrerror) # stops us from going down further