From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>, patches@linaro.org
Subject: [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused
Date: Sun, 14 Sep 2014 20:36:33 +0100 [thread overview]
Message-ID: <1410723393-17812-1-git-send-email-peter.maydell@linaro.org> (raw)
The XtensaConfig structs will be defined but not used if they are
for the opposite endianness from that of the binary being built;
keep the compiler from complaining about this by marking them
with the 'unused' attribute.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
This works, although it's a tad ugly. If anybody wants to suggest
something better...
target-xtensa/core-dc232b.c | 2 +-
target-xtensa/core-dc233c.c | 2 +-
target-xtensa/core-fsf.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/target-xtensa/core-dc232b.c b/target-xtensa/core-dc232b.c
index c51e11e..a3b914b 100644
--- a/target-xtensa/core-dc232b.c
+++ b/target-xtensa/core-dc232b.c
@@ -33,7 +33,7 @@
#include "core-dc232b/core-isa.h"
#include "overlay_tool.h"
-static const XtensaConfig dc232b = {
+static const XtensaConfig dc232b __attribute__((unused)) = {
.name = "dc232b",
.gdb_regmap = {
.num_regs = 120,
diff --git a/target-xtensa/core-dc233c.c b/target-xtensa/core-dc233c.c
index 42dd64f..ac745d1 100644
--- a/target-xtensa/core-dc233c.c
+++ b/target-xtensa/core-dc233c.c
@@ -34,7 +34,7 @@
#include "core-dc233c/core-isa.h"
#include "overlay_tool.h"
-static const XtensaConfig dc233c = {
+static const XtensaConfig dc233c __attribute__((unused)) = {
.name = "dc233c",
.gdb_regmap = {
.num_regs = 121,
diff --git a/target-xtensa/core-fsf.c b/target-xtensa/core-fsf.c
index 6859bee..cfcc840 100644
--- a/target-xtensa/core-fsf.c
+++ b/target-xtensa/core-fsf.c
@@ -33,7 +33,7 @@
#include "core-fsf/core-isa.h"
#include "overlay_tool.h"
-static const XtensaConfig fsf = {
+static const XtensaConfig fsf __attribute__((unused)) = {
.name = "fsf",
/* GDB for this core is not supported currently */
.clock_freq_khz = 10000,
--
2.0.0
next reply other threads:[~2014-09-14 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-14 19:36 Peter Maydell [this message]
2014-09-14 20:29 ` [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused Max Filippov
2014-10-10 16:24 ` Peter Maydell
2014-10-10 17:20 ` Max Filippov
2014-10-23 6:37 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
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=1410723393-17812-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=jcmvbkbc@gmail.com \
--cc=patches@linaro.org \
--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).