Skip to content

Commit 695fd08

Browse files
committed
testsuite: Fix build with gcc < 15
Variable declaration inside a switch case works with gcc 15, but fails pretty much everywhere else with a message like below: ../testsuite/init_module.c: In function ‘syscall’: ../testsuite/init_module.c:343:3: error: a label can only be part of a statement and a declaration is not a statement 343 | const char *args; | ^~~~~ Add an empty statement to fix it. Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: #390
1 parent 5d845ab commit 695fd08

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

testsuite/init_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ TS_EXPORT long int syscall(long int __sysno, ...)
339339
#endif
340340
errno = ENOSYS;
341341
return -1;
342-
case __NR_finit_module:
342+
case __NR_finit_module:;
343343
const char *args;
344344
int flags;
345345
int fd;
@@ -354,7 +354,7 @@ TS_EXPORT long int syscall(long int __sysno, ...)
354354

355355
va_end(ap);
356356
return ret;
357-
case __NR_gettid:
357+
case __NR_gettid:;
358358
static long (*nextlib_syscall)(long number, ...);
359359

360360
if (nextlib_syscall == NULL) {

0 commit comments

Comments
 (0)