[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 00/11] Ide patches
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PULL 00/11] Ide patches |
Date: |
Mon, 18 Sep 2017 08:51:27 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/16/2017 09:34 AM, Peter Maydell wrote:
> Hi; I'm afraid this doesn't build with clang:
>
> /home/petmay01/linaro/qemu-for-merges/hw/ide/core.c:70:15: error:
> comparison of unsigned enum expression >= 0 is always true
> [-Werror,-Wtautological-compare]
> if (enval >= 0 && enval < IDE_DMA__COUNT) {
> ~~~~~ ^ ~
> 1 error generated.
>
> (It's impdef whether an enum with all positive values is
> a signed type or unsigned type, so just deleting the
> comparison against 0 would also be wrong...)
But if ((unsigned)enval < IDE_DMA__COUNT) {
should work, regardless of the signedness of the enum.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PULL 10/11] AHCI: pretty-print FIS to buffer instead of stderr, (continued)
- [Qemu-devel] [PULL 10/11] AHCI: pretty-print FIS to buffer instead of stderr, John Snow, 2017/09/15
- [Qemu-devel] [PULL 09/11] AHCI: Rework IRQ constants, John Snow, 2017/09/15
- [Qemu-devel] [PULL 05/11] IDE: add tracing for data ports, John Snow, 2017/09/15
- [Qemu-devel] [PULL 01/11] ide: ahci: unparent children buses before freeing their memory, John Snow, 2017/09/15
- [Qemu-devel] [PULL 06/11] ATAPI: Replace DEBUG_IDE_ATAPI with tracing events, John Snow, 2017/09/15
- [Qemu-devel] [PULL 07/11] IDE: replace DEBUG_AIO with trace events, John Snow, 2017/09/15
- [Qemu-devel] [PULL 11/11] AHCI: remove DPRINTF macro, John Snow, 2017/09/15
- [Qemu-devel] [PULL 08/11] AHCI: Replace DPRINTF with trace-events, John Snow, 2017/09/15
- Re: [Qemu-devel] [PULL 00/11] Ide patches, no-reply, 2017/09/15
- Re: [Qemu-devel] [PULL 00/11] Ide patches, Peter Maydell, 2017/09/16
- Re: [Qemu-devel] [PULL 00/11] Ide patches,
Eric Blake <=
- Re: [Qemu-devel] [PULL 00/11] Ide patches, John Snow, 2017/09/18
- Re: [Qemu-devel] [PULL 00/11] Ide patches, Peter Maydell, 2017/09/18
- Re: [Qemu-devel] [PULL 00/11] Ide patches, Peter Maydell, 2017/09/18
- Re: [Qemu-devel] [PULL 00/11] Ide patches, Mark Cave-Ayland, 2017/09/20
- Re: [Qemu-devel] [PULL 00/11] Ide patches, John Snow, 2017/09/20
- Re: [Qemu-devel] [PULL 00/11] Ide patches, Mark Cave-Ayland, 2017/09/20