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