From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTFbD-0003UT-Fi for qemu-devel@nongnu.org; Sun, 14 Sep 2014 15:36:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTFb8-0002P7-Ht for qemu-devel@nongnu.org; Sun, 14 Sep 2014 15:36:39 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:47000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTFb8-0002P3-C7 for qemu-devel@nongnu.org; Sun, 14 Sep 2014 15:36:34 -0400 From: Peter Maydell Date: Sun, 14 Sep 2014 20:36:33 +0100 Message-Id: <1410723393-17812-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Max Filippov , patches@linaro.org 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 --- 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