[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: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PULL 00/30] KVM, build, NBD, SCSI patches for 2016-06-16 |
Date: |
Thu, 16 Jun 2016 19:01:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
On 16/06/2016 18:55, Peter Maydell wrote:
>> > 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).
Does it fire even of
void f(unsigned short x)
{
printf ("%hx", x | 1);
}
?
Because technically that's an int too (and that's why I think this
particular warning is not a great thing)...
Paolo
- [Qemu-devel] [PULL 26/30] scsi: esp: check buffer length before reading scsi command, (continued)
- [Qemu-devel] [PULL 26/30] scsi: esp: check buffer length before reading scsi command, Paolo Bonzini, 2016/06/16
- [Qemu-devel] [PULL 25/30] nbd: Avoid magic number for NBD max name size, Paolo Bonzini, 2016/06/16
- [Qemu-devel] [PULL 24/30] nbd: Detect servers that send unexpected error values, Paolo Bonzini, 2016/06/16
- [Qemu-devel] [PULL 29/30] scsi: esp: make cmdbuf big enough for maximum CDB size, Paolo Bonzini, 2016/06/16
- [Qemu-devel] [PULL 27/30] scsi: esp: respect FIFO invariant after message phase, Paolo Bonzini, 2016/06/16
- [Qemu-devel] [PULL 30/30] vl: smp_parse: cleanups, Paolo Bonzini, 2016/06/16
- [Qemu-devel] [PULL 28/30] scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd, Paolo Bonzini, 2016/06/16
- Re: [Qemu-devel] [PULL 00/30] KVM, build, NBD, SCSI patches for 2016-06-16, Peter Maydell, 2016/06/16
- Re: [Qemu-devel] [PULL 00/30] KVM, build, NBD, SCSI patches for 2016-06-16, Paolo Bonzini, 2016/06/16
- Re: [Qemu-devel] [PULL 00/30] KVM, build, NBD, SCSI patches for 2016-06-16, Peter Maydell, 2016/06/16
- Re: [Qemu-devel] [PULL 00/30] KVM, build, NBD, SCSI patches for 2016-06-16,
Paolo Bonzini <=
- Re: [Qemu-devel] [PULL 00/30] KVM, build, NBD, SCSI patches for 2016-06-16, Peter Maydell, 2016/06/16