target-xtensa: mark XtensaConfig structs as unused
PATCH 1/1 target-xtensa: mark XtensaConfig structs as unused
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.
---
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(-)
target-xtensa/core-dc232b.c +1 -1
@@ -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,
target-xtensa/core-dc233c.c +1 -1
@@ -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,
target-xtensa/core-fsf.c +1 -1
@@ -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,
Signature · 1 line
2.0.0
Quoted 9 lines · Peter Maydell
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 <[email protected]>---
This works, although it's a tad ugly. If anybody wants to suggest something better...
Fine for me.
Quoted 4 lines
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(-)
Signature · 2 lines
Thanks. -- Max
Quoted 12 lines · Max Filippov
Quoted 9 lines · Peter Maydell
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 <[email protected]>---
This works, although it's a tad ugly. If anybody wants to suggest something better...
Quoted 8 lines
Fine for me.
Quoted 4 lines
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(-)Acked-by Max Filippov <[email protected]>
Thanks. I guess we could put this one in through
-trivial ?
Patchwork url:
http://patchwork.ozlabs.org/patch/389115/
-- PMM
Quoted 20 lines · Peter Maydell
Quoted 19 lines · Max Filippov
Quoted 9 lines · Peter Maydell
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 <[email protected]>---
This works, although it's a tad ugly. If anybody wants to suggest something better...Fine for me.
Quoted 4 lines
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(-)
Quoted 4 lines
Quoted 1 line
Acked-by Max Filippov <[email protected]>Thanks. I guess we could put this one in through
-trivial ?
Yes, please.
Quoted 2 lines
Patchwork url:
http://patchwork.ozlabs.org/patch/389115/
Signature · 2 lines
Thanks. -- Max
Michael Tokarev
AppliedQuoted 7 lines · Peter Maydell
Quoted 6 lines · Max Filippov
Quoted 4 lines · Peter Maydell
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.
Applied to -trivial, thanks!
/mjt