[libvirt] [PATCH] m4: fix setting of warning flags

Daniel P. Berrangé posted 1 patch 1 week ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20191008134108.7501-1-berrange@redhat.com
m4/virt-compile-warnings.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[libvirt] [PATCH] m4: fix setting of warning flags

Posted by Daniel P. Berrangé 1 week ago
When adding the -std=gnu99 flag, we set $wantwarn instead
of appending to it. This meant all the compiler warnings
were accidentally discarded.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---

Pushed as a trivial fix for the previous commit

 m4/virt-compile-warnings.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index 411d257465..26f231f97e 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -192,7 +192,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
     # Request the gnu99 standard which is the best choice with
     # gcc 4.8.0. Not a warning flag, but the probing mechanism
     # is convenient
-    wantwarn="-std=gnu99"
+    wantwarn="$wantwarn -std=gnu99"
 
     # Check for $CC support of each warning
     for w in $wantwarn; do
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list