Re: [PATCH] util: Fix build with clang

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

 



On Fri, Dec 09, 2016 at 11:52:43AM +0100, Martin Kletzander wrote:
> When compiling with clang on Linux, it complains that "passing an
> object that undergoes default argument promotion to 'va_start' has
> undefined behavior".  That is true according to the C standard,
> although I couldn't find any mention about enum->int promotion (even
> though it's a sensible one).  The only fix I came up with was changing
> the layer parameter to int so that it does not undergo any default
> argument promotion.

Can we not just cast 'layer' to an int in the va_start call ?


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
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