From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] powerpc: mpc5xxx: declare taskTable as array
Date: Wed, 3 Sep 2025 14:42:23 +0200 [thread overview]
Message-ID: <20250903124223.469449-1-s.hauer@pengutronix.de> (raw)
gcc15 rightfully complains about access outside array bounds in usage of
taskTable:
arch/powerpc/mach-mpc5xxx/loadtask.c:37:43: error: array subscript 1 is outside array bounds of 'int[1]' [-Werror=array-bounds=]
Declare that variable as an array as that's what it actually is.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/powerpc/mach-mpc5xxx/loadtask.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/mach-mpc5xxx/loadtask.c b/arch/powerpc/mach-mpc5xxx/loadtask.c
index e2489983ee..9302cbdcdc 100644
--- a/arch/powerpc/mach-mpc5xxx/loadtask.c
+++ b/arch/powerpc/mach-mpc5xxx/loadtask.c
@@ -13,12 +13,12 @@
#include <types.h>
/* BestComm/SmartComm microcode */
-extern int taskTable;
+extern int taskTable[];
void loadtask(int basetask, int tasks)
{
int *sram = (int *)MPC5XXX_SRAM;
- int *task_org = &taskTable;
+ int *task_org = taskTable;
unsigned int start, offset, end;
int i;
--
2.47.2
next reply other threads:[~2025-09-03 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 12:42 Sascha Hauer [this message]
2025-09-04 9:27 ` Ahmad Fatoum
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=20250903124223.469449-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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: link
Be 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