summaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2019-01-06 21:09:58 +0100
committerGeert Uytterhoeven <geert@linux-m68k.org>2019-01-21 10:36:53 +0100
commitc097a39ce1f39b0ff2357ff1e787145e8c47da4c (patch)
treefd0bde09560dc537e39715545fc77fa4ccce20fd /arch/m68k
parent35f61d7b3ba36f85dacc20c62e5d0dca0807bc77 (diff)
downloadlinux-0-day-c097a39ce1f39b0ff2357ff1e787145e8c47da4c.tar.gz
linux-0-day-c097a39ce1f39b0ff2357ff1e787145e8c47da4c.tar.xz
m68k/atari: Avoid VLA use in atari_switches_setup()
With gcc 7.3.0: arch/m68k/atari/config.c: In function ‘atari_switches_setup’: arch/m68k/atari/config.c:151:2: warning: ISO C90 forbids variable length array ‘switches’ [-Wvla] char switches[strlen(str) + 1]; ^~~~ Replace the variable size by the maximum kernel command line size (256 bytes), which is an upper limit for all suboptions. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/atari/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index bd96702a1ad09..4fcc4b1df1c0f 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -148,7 +148,7 @@ int __init atari_parse_bootinfo(const struct bi_record *record)
/* Parse the Atari-specific switches= option. */
static int __init atari_switches_setup(char *str)
{
- char switches[strlen(str) + 1];
+ char switches[COMMAND_LINE_SIZE];
char *p;
int ovsc_shift;
char *args = switches;