Re: [PATCH] maint: update to latest gnulib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 14, 2017 at 03:27:25PM +0200, Martin Kletzander wrote:
> On Wed, Jun 14, 2017 at 11:20:44AM +0100, Daniel P. Berrange wrote:
> > This fixes an incompatibility with glibc 2.25.90
> > 
> > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> > ---
> > 
> > Pushed as a broken build fix to get CI back online
> > 
> 
> After this update the build fails for me with gcc-7.1.0 with the
> following error:
> 
> In file included from util/virobject.c:28:0:
> util/virobject.c: In function 'virClassNew':
> util/viratomic.h:176:46: error: this condition has identical branches [-Werror=duplicated-branches]
>             (void)(0 ? *(atomic) ^ *(atomic) : 0);                      \
>                                              ^
> util/virobject.c:144:20: note: in expansion of macro 'virAtomicIntInc'
>     klass->magic = virAtomicIntInc(&magicCounter);
>                    ^~~~~~~~~~~~~~~
> 
> Does that mean that gcc does optimize our prefetch trick away
> (considering I understood what that line is trying to do)?  Or should we
> just turn the warning off for that header file?

Yep, "-Wduplicated-branches" appears to be a new warning flag in gcc 7.1
which gnulib turns on. There's a similar hit with mingw

../../src/util/vircommand.c: In function 'virCommandWait':
../../src/util/vircommand.c:2562:51: error: this condition has identical branches [-Werror=duplicated-branches]
             *exitstatus = cmd->rawStatus ? status : WEXITSTATUS(status);
                                                   ^
cc1: all warnings being treated as errors


because WEXITSTATUS(x) expands to 'x' on Win32.

We could use a pragma to turn off selectively, but I'm more
inclined to just disable this new warning flag. 




Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux