Browse Source

[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>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
a87c0c4f0f
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/drivers/bus/isa.c

+ 3
- 3
src/drivers/bus/isa.c View File

46
 #endif
46
 #endif
47
 
47
 
48
 #define ISA_IOADDR( driver, ioidx )					  \
48
 #define ISA_IOADDR( driver, ioidx )					  \
49
-	( ( (ioidx) < 0 ) ?						  \
50
-	  isa_extra_probe_addrs[ (ioidx) + ISA_EXTRA_PROBE_ADDR_COUNT ] : \
51
-	  (driver)->probe_addrs[(ioidx)] )
49
+	( ( (ioidx) >= 0 ) ?						  \
50
+	  (driver)->probe_addrs[(ioidx)] :				  \
51
+	  *( isa_extra_probe_addrs + (ioidx) + ISA_EXTRA_PROBE_ADDR_COUNT ) )
52
 
52
 
53
 static void isabus_remove ( struct root_device *rootdev );
53
 static void isabus_remove ( struct root_device *rootdev );
54
 
54
 

Loading…
Cancel
Save