From 412cc0f4038875aa1b0a3c176c309a7e777e9c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 8 Oct 2019 15:37:11 +0100 Subject: [PATCH] build: stop clang complaining about redefined typedefs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clang's gnu99 mode is not quite the same as GCC's. It will complain about redefined typedefs being a C11 feature, while GCC does not complain and allows them in gnu99 mode. Reviewed-by: Fabiano FidĂȘncio Signed-off-by: Daniel P. BerrangĂ© --- m4/virt-compile-warnings.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 26f231f97e..4f9eee121c 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -125,6 +125,10 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ # We do "bad" function casts all the time for event callbacks wantwarn="$wantwarn -Wno-cast-function-type" + # CLang incorrectly complains about dup typedefs win gnu99 mode + # so use this CLang-specific arg to keep it quiet + wantwarn="$wantwarn -Wno-typedef-redefinition" + # GNULIB expects this to be part of -Wc++-compat, but we turn # that one off, so we need to manually enable this again wantwarn="$wantwarn -Wjump-misses-init"