diff options
author | Michael Brown <mcb30@ipxe.org> | 2021-01-15 20:54:27 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-01-15 20:54:27 +0000 |
commit | 8e3826aa10ee5b2d9f85d6177cc061260f3388df (patch) | |
tree | 74462e1b9dbc7f52475a7813d3c0c87fe8ce2804 /src/drivers/bus | |
parent | a5fb41873dc1dcce5dcc817bf53a0649c01f8cac (diff) | |
download | ipxe-8e3826aa10ee5b2d9f85d6177cc061260f3388df.tar.gz |
[build] Inhibit spurious array bounds warning on some versions of gcc
Some versions of gcc (observed with gcc 9.3.0 on NixOS Linux) produce
a spurious warning about an out-of-bounds array access for the
isa_extra_probe_addrs[] array.
Work around this compiler bug by redefining the array index as a
signed long, which seems to somehow avoid this spurious warning.
Debugged-by: Manuel Mendez <mmendez534@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/bus')
-rw-r--r-- | src/drivers/bus/isa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/bus/isa.c b/src/drivers/bus/isa.c index 6b360a44d..94d4ce99b 100644 --- a/src/drivers/bus/isa.c +++ b/src/drivers/bus/isa.c @@ -95,7 +95,7 @@ static void isa_remove ( struct isa_device *isa ) { static int isabus_probe ( struct root_device *rootdev ) { struct isa_device *isa = NULL; struct isa_driver *driver; - int ioidx; + long ioidx; int rc; for_each_table_entry ( driver, ISA_DRIVERS ) { |