[Top][All Lists]

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

Re: [Qemu-devel] [PULL 00/30] KVM, build, NBD, SCSI patches for 2016-06-

From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL 00/30] KVM, build, NBD, SCSI patches for 2016-06-16
Date: Thu, 16 Jun 2016 17:55:19 +0100

On 16 June 2016 at 17:29, Paolo Bonzini <address@hidden> wrote:
> On 16/06/2016 18:02, Peter Maydell wrote:
>> Hi. I'm afraid this generates format string warnings on OSX:
> Interesting, I did test clang this time.  I'll fix it but really this
> is a compiler bug.  It's *impossible* to pass a short variable
> argument, hence va_arg(ap, short) *must* be the same as va_arg(ap, int).

This one's an OSX/Apple special -- it isn't part of the stock clang.
(It has its good points -- this is the only 64-bit platform that
will warn about format string issues that will break compile on
32-bit hosts.)

I guess the point of the warning in this particular case is to
say "you passed something that could be wider than a short but
you used a format specifier which is for a short/unsigned short"
(ie your format might be unintentionally dropping the top 16 bits
of the data).

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]