public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109233] New: warning: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ Date: Tue, 21 Mar 2023 13:58:56 +0000 [thread overview] Message-ID: <bug-109233-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109233 Bug ID: 109233 Summary: warning: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com Target Milestone: --- There is another bogus array bounds warning when compiling linux in: drivers/net/ethernet/broadcom/tg3.c: In function ‘tg3_init_one’: drivers/net/ethernet/broadcom/tg3.c:17787:51: error: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ [-Werror=array-bounds=] 17787 | struct tg3_napi *tnapi = &tp->napi[i]; | ~~~~~~~~^~~ In file included from drivers/net/ethernet/broadcom/tg3.c:72: drivers/net/ethernet/broadcom/tg3.h:3203:41: note: while referencing ‘napi’ 3203 | struct tg3_napi napi[TG3_IRQ_MAX_VECS]; | ^~~~ drivers/net/ethernet/broadcom/tg3.c:17787:51: error: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ [-Werror=array-bounds=] 17787 | struct tg3_napi *tnapi = &tp->napi[i]; | ~~~~~~~~^~~ drivers/net/ethernet/broadcom/tg3.h:3203:41: note: while referencing ‘napi’ 3203 | struct tg3_napi napi[TG3_IRQ_MAX_VECS]; | ^~~~ cc1: all warnings being treated as errors
next reply other threads:[~2023-03-21 13:58 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-21 13:58 ubizjak at gmail dot com [this message] 2023-03-21 14:01 ` [Bug c/109233] " ubizjak at gmail dot com 2023-03-21 14:05 ` ubizjak at gmail dot com 2023-03-22 10:27 ` ubizjak at gmail dot com 2023-03-22 10:38 ` [Bug c/109233] warning: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ since r12-2591 jakub at gcc dot gnu.org 2023-03-22 10:40 ` [Bug c/109233] [12/13 Regression] " jakub at gcc dot gnu.org 2023-03-22 10:43 ` ubizjak at gmail dot com 2023-03-22 12:10 ` ubizjak at gmail dot com 2023-03-22 14:13 ` marxin at gcc dot gnu.org 2023-03-22 14:37 ` jakub at gcc dot gnu.org 2023-03-22 14:39 ` jakub at gcc dot gnu.org 2023-03-22 15:02 ` aldyh at gcc dot gnu.org 2023-03-22 17:16 ` amacleod at redhat dot com 2023-03-23 10:00 ` rguenth at gcc dot gnu.org 2023-03-27 6:13 ` ubizjak at gmail dot com 2023-05-08 12:26 ` [Bug c/109233] [12/13/14 " rguenth at gcc dot gnu.org 2024-06-20 9:12 ` [Bug c/109233] [12/13/14/15 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109233-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).