cpukit/libmisc/shell/main_mknod.c: Address -Wclobbered warning

This warning indicates the potential for using a local variable which
is not guaranteed to be preserved across a setjmp()/longjmp() pair.
In this case, it was a false positive and the warning was disabled.

Updates #5364.
This commit is contained in:
Joel Sherrill
2026-01-23 17:34:22 -06:00
parent 8ab6a256d3
commit 63c93acec1

View File

@@ -100,6 +100,9 @@ rtems_shell_mknod_exit (rtems_shell_mknod_globals* globals, int code)
#include "mknod-pack_dev.c"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclobbered"
static int
rtems_shell_main_mknod(int argc, char *argv[])
{
@@ -112,6 +115,8 @@ rtems_shell_main_mknod(int argc, char *argv[])
return mknod_globals.exit_code;
}
#pragma GCC diagnostic pop
#define getprogname() "mknod"
#ifdef KERN_DRIVERS