diff options
| author | Michael Brown | 2012-07-20 19:32:58 +0200 |
|---|---|---|
| committer | Michael Brown | 2012-07-20 19:32:58 +0200 |
| commit | a87c0c4f0f47f5dc4b4d7050b15713a9f7a52757 (patch) | |
| tree | 82c0d1c82687a9e0a9a698707fb60763cf2947be /src | |
| parent | [build] Include git commit within version string when available (diff) | |
| download | ipxe-a87c0c4f0f47f5dc4b4d7050b15713a9f7a52757.tar.gz ipxe-a87c0c4f0f47f5dc4b4d7050b15713a9f7a52757.tar.xz ipxe-a87c0c4f0f47f5dc4b4d7050b15713a9f7a52757.zip | |
[isa] Avoid spurious compiler warning on gcc 4.7
gcc 4.7 produces a spurious warning about an array subscript being out
of bounds. Use a pointer dereference instead of an array lookup to
inhibit this spurious warning.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/bus/isa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/bus/isa.c b/src/drivers/bus/isa.c index 9b562c664..da0c43c60 100644 --- a/src/drivers/bus/isa.c +++ b/src/drivers/bus/isa.c @@ -46,9 +46,9 @@ static isa_probe_addr_t isa_extra_probe_addrs[] = { #endif #define ISA_IOADDR( driver, ioidx ) \ - ( ( (ioidx) < 0 ) ? \ - isa_extra_probe_addrs[ (ioidx) + ISA_EXTRA_PROBE_ADDR_COUNT ] : \ - (driver)->probe_addrs[(ioidx)] ) + ( ( (ioidx) >= 0 ) ? \ + (driver)->probe_addrs[(ioidx)] : \ + *( isa_extra_probe_addrs + (ioidx) + ISA_EXTRA_PROBE_ADDR_COUNT ) ) static void isabus_remove ( struct root_device *rootdev ); |
