[libvirt] [PATCH] util: Fix build with clang

Ján Tomko jtomko at redhat.com
Fri Dec 9 12:17:59 UTC 2016

On Fri, Dec 09, 2016 at 11:18:32AM +0000, Daniel P. Berrange wrote:
>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 ?

That also fails to compile.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161209/44323fab/attachment-0001.sig>

More information about the libvir-list mailing list