mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-02-04 12:41:34 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user