From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Laurent Vivier" <laurent@vivier.eu>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 2/2] linux-user/signal: Silent -Winitializer-overrides warnings
Date: Tue, 20 Dec 2022 15:42:19 +0100 [thread overview]
Message-ID: <20221220144219.25254-3-philmd@linaro.org> (raw)
In-Reply-To: <20221220144219.25254-1-philmd@linaro.org>
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
next prev parent reply other threads:[~2022-12-20 14:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 14:42 [PATCH 0/2] linux-user: Fix a pair of -Wextra warnings Philippe Mathieu-Daudé
2022-12-20 14:42 ` [PATCH 1/2] linux-user/syscall: Silent -Wmissing-field-initializers warnings Philippe Mathieu-Daudé
2022-12-20 14:42 ` Philippe Mathieu-Daudé [this message]
2022-12-20 15:47 ` [PATCH 2/2] linux-user/signal: Silent -Winitializer-overrides warnings Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221220144219.25254-3-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).