[ipxe-devel] util/nrv2b.c:633:17: error: array subscript is above array bounds

Thomas Miletich thomas.miletich at gmail.com
Wed Apr 11 18:10:52 UTC 2012


2012/4/11 Ján ONDREJ (SAL) <ondrejj at salstar.sk>:
> Hello,
>
>  compiling today's git fails with this error:
>
> [ondrejj at work src]$ make
>  [HOSTCC] util/zbin
>  [LD] bin/ipxe.dsk.tmp
> In file included from util/zbin.c:6:0:
> util/nrv2b.c: In function ‘find_match’:
> util/nrv2b.c:633:17: error: array subscript is above array bounds
> [-Werror=array-bounds]
> util/nrv2b.c:634:14: error: array subscript is above array bounds
> [-Werror=array-bounds]
> cc1: all warnings being treated as errors
> make: *** [util/zbin] Error 1
> make: *** Waiting for unfinished jobs....
>
>  Suggested change from meteger on IRC helped to solve this problem.
>
> [19:54] <meteger:#ipxe> SALstar: open util/nrv2b.c, go to line 212, and
> change  the "#define SWD_BEST_OFF    1" to "#define SWD_BEST_OFF    3"

Which probably breaks some things around line 689, so please don't try
this at home.
As you also stated in IRC, appending "NO_WERROR" to the build command
seems like a sensible workaround.

>                                SAL

Thomas



More information about the ipxe-devel mailing list