Actions
Bug #15496
opendr: array subscript 3 is above array bounds
Start date:
Due date:
% Done:
90%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Build error with gcc 12:
../../i86pc/io/dr/dr.c: In function 'dr_dev_found': ../../i86pc/io/dr/dr.c:102:56: error: array subscript 3 is above array bounds of 'dr_dev_unit_t *[3]' [-Werror=array-bounds] 102 | #define DR_GET_BOARD_DEVUNIT(sb, ut, un) (&((sb)->b_dev[DEVSET_NIX(ut)][un])) | ~~~~~~~~~~~^~~~~~~~~~~~~~~~ ../../i86pc/io/dr/dr.c:2829:14: note: in expansion of macro 'DR_GET_BOARD_DEVUNIT' 2829 | dp = DR_GET_BOARD_DEVUNIT(bp, nt, unum); | ^~~~~~~~~~~~~~~~~~~~ In file included from ../../i86pc/io/dr/dr.c:62: ../../i86pc/sys/dr.h:393:26: note: while referencing 'b_dev' 393 | dr_dev_unit_t *b_dev[DR_MAXNUM_NT]; | ^~~~~ cc1: all warnings being treated as errors
Actions