qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] linux-user/signal: Silent -Winitializer-overrides warnings


From: Philippe Mathieu-Daudé
Subject: [PATCH 2/2] linux-user/signal: Silent -Winitializer-overrides warnings
Date: Tue, 20 Dec 2022 15:42:19 +0100

The target SIGIOT signal is sometimes aliased with SIGABRT,
producing the following warning when compiling with -Wextra:

  ../linux-user/signal.c:57:9: warning: initializer overrides prior 
initialization of this subobject [-Winitializer-overrides]
          MAKE_SIGNAL_LIST
          ^~~~~~~~~~~~~~~~
  ../linux-user/signal-common.h:165:9: note: expanded from macro 
'MAKE_SIGNAL_LIST'
          MAKE_SIG_ENTRY_SIGIOT
          ^~~~~~~~~~~~~~~~~~~~~
  ../linux-user/signal-common.h:128:41: note: expanded from macro 
'MAKE_SIG_ENTRY_SIGIOT'
  #define MAKE_SIG_ENTRY_SIGIOT           MAKE_SIG_ENTRY(SIGIOT)
                                          ^~~~~~~~~~~~~~~~~~~~~~
  ../linux-user/signal.c:56:41: note: expanded from macro 'MAKE_SIG_ENTRY'
  #define MAKE_SIG_ENTRY(sig)     [sig] = TARGET_##sig,
                                          ^~~~~~~~~~~~
  <scratch space>:81:1: note: expanded from here
  TARGET_SIGIOT
  ^~~~~~~~~~~~~
  ../linux-user/sh4/../generic/signal.h:26:34: note: expanded from macro 
'TARGET_SIGIOT'
  #define TARGET_SIGIOT            6
                                   ^
  <scratch space>:55:1: note: expanded from here
  TARGET_SIGABRT
  ^~~~~~~~~~~~~~
  ../linux-user/sh4/../generic/signal.h:25:34: note: expanded from macro 
'TARGET_SIGABRT'
  #define TARGET_SIGABRT           6
                                   ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 linux-user/signal-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/signal-common.h b/linux-user/signal-common.h
index 3e2dc604c2..a168ea4851 100644
--- a/linux-user/signal-common.h
+++ b/linux-user/signal-common.h
@@ -124,7 +124,7 @@ static inline void finish_sigsuspend_mask(int ret)
 #define MAKE_SIG_ENTRY_SIGSTKFLT
 #endif
 
-#if defined(SIGIOT) && defined(TARGET_SIGIOT)
+#if defined(SIGIOT) && defined(TARGET_SIGIOT) && TARGET_SIGABRT != 
TARGET_SIGIOT
 #define MAKE_SIG_ENTRY_SIGIOT           MAKE_SIG_ENTRY(SIGIOT)
 #else
 #define MAKE_SIG_ENTRY_SIGIOT
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]