[libvirt] [PATCH 4/8] build: ignore some clang-specific warnings

Ján Tomko jtomko at redhat.com
Wed Jun 29 13:53:57 UTC 2016


These cause build errors with clang 3.8.

Disable:
  -Wunevaluated-expression,
   * problems with VIR_TYPEMATCH
  -Wparentheses-equality,
   * we don't want to delete parentheses from macros
  -Waddress-of-packed-member
   * virNWFilterSnoopDHCP violates
  -Wtautological-pointer-compare
   * macros in cputest violate
---
 m4/virt-compile-warnings.m4 | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index b622e22..661d60b 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -215,6 +215,15 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
       wantwarn="$wantwarn -Werror"
     fi
 
+    # clang 3.8 chokes on VIR_TYPEMATCH
+    wantwarn="$wantwarn -Wno-unevaluated-expression"
+    # we want extra parentheses around equality comparisons in macros
+    wantwarn="$wantwarn -Wno-parentheses-equality"
+    # virNWFilterSnoopDHCP
+    wantwarn="$wantwarn -Wno-address-of-packed-member"
+    # macros in cputest
+    wantwarn="$wantwarn -Wno-tautological-pointer-compare"
+
     # Check for $CC support of each warning
     for w in $wantwarn; do
       gl_WARN_ADD([$w])
-- 
2.7.3




More information about the libvir-list mailing list