[libvirt] In freeze for libvirt-0.9.8 and availability of rc2

Eric Blake eblake at redhat.com
Mon Dec 5 17:16:43 UTC 2011


On 12/05/2011 09:41 AM, Daniel P. Berrange wrote:
> On Mon, Dec 05, 2011 at 09:25:40AM -0700, Eric Blake wrote:
>> On 12/04/2011 02:26 AM, Peter Krempa wrote:
>>> I tried building rc2 on my macbook and build was successful, but I've
>>> got a warning on each file built:
>>>
>>> cc1: warning: command line option "-Wabi" is valid for C++/ObjC++ but
>>> not for C
>>> cc1: warning: command line option "-Wdeprecated" is valid for C++/ObjC++
>>> but not for C
>>
>> This is a known (and harmless) issue with the gnulib 'manywarnings'
>> module, and only triggers with older versions of gcc.  It will probably
>> be resolved in gnulib in time for libvirt 0.9.9, but I don't see us
>> doing anything about it for now (if you don't want the warning, then
>> don't use --enable-compile-warnings with ./autogen.sh or ./configure).
> 
> Can we workaround it by adding
> 
> 
>    dontwarn="$dontwarn -Wabi"
>    dontwarn="$dontwarn -Wdeprecated"
> 
> to our m4 config, until such time as we rebase gnulib ?

Sure.  Done as follows, under the trivial rule:

From f17e0e2182ecefd9ba9eb346bab839cd5b59fb9c Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake at redhat.com>
Date: Mon, 5 Dec 2011 10:14:55 -0700
Subject: [PATCH] build: reduce warnings from older gcc

Older gcc warns (on every file!) that -Wabi and -Wdeprecated only
make sense on C++ projects.  Newer gcc accepts these warnings for
C, but it is not clear that they can do anything useful, so it
is easier to just drop the warnings altogether.

* m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Silence
-Wabi and -Wdeprecated on older gcc.
Reported by Peter Krempa.
---
 m4/virt-compile-warnings.m4 |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index a17e4b7..ba388aa 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -22,6 +22,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[

         # Don't care about C++ compiler compat
         dontwarn="$dontwarn -Wc++-compat"
+        dontwarn="$dontwarn -Wabi"
+        dontwarn="$dontwarn -Wdeprecated"
         # Don't care about ancient C standard compat
         dontwarn="$dontwarn -Wtraditional"
         # Don't care about ancient C standard compat
-- 
1.7.7.3

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111205/8dd67f7f/attachment-0001.sig>


More information about the libvir-list mailing list