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: https://github.com/kmod-project/kmod/pull/390
This commit is contained in:
Lucas De Marchi 2025-07-11 10:53:53 -05:00
parent 5d845ab29a
commit 695fd084a7

View File

@ -339,7 +339,7 @@ TS_EXPORT long int syscall(long int __sysno, ...)
#endif
errno = ENOSYS;
return -1;
case __NR_finit_module:
case __NR_finit_module:;
const char *args;
int flags;
int fd;
@ -354,7 +354,7 @@ TS_EXPORT long int syscall(long int __sysno, ...)
va_end(ap);
return ret;
case __NR_gettid:
case __NR_gettid:;
static long (*nextlib_syscall)(long number, ...);
if (nextlib_syscall == NULL) {