Skip to contentSkip to conversation

target/xtensa: Remove duplicate typedef of DisasContext

PATCH In review Peter Maydell 1 participant 2 messages Jan 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/xtensa: Remove duplicate typedef of DisasContext

Some older versions of gcc complain if a typedef is defined twice:

target/xtensa/translate.c:81: error: redefinition of typedef 'DisasContext' target/xtensa/cpu.h:339: note: previous declaration of 'DisasContext' was here

Remove the now-redundant typedef from the definition of the struct in translate.c.

---
 target/xtensa/translate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/xtensa/translate.c +2 -2
index 4bdfcd2..bec9efc 100644
@@ -50,7 +50,7 @@
 /* is_jmp field values */
 #define DISAS_UPDATE  DISAS_TARGET_0 /* cpu state was modified dynamically */
 
-typedef struct DisasContext {
+struct DisasContext {
     const XtensaConfig *config;
     TranslationBlock *tb;
     uint32_t pc;
@@ -78,7 +78,7 @@ typedef struct DisasContext {
     uint32_t *raw_arg;
     xtensa_insnbuf insnbuf;
     xtensa_insnbuf slotbuf;
-} DisasContext;
+};
 
 static TCGv_i32 cpu_pc;
 static TCGv_i32 cpu_R[16];
Signature · 1 line
2.7.4
#1 lore raw
Quoted 11 lines · Peter Maydell

Some older versions of gcc complain if a typedef is defined twice:

target/xtensa/translate.c:81: error: redefinition of typedef 'DisasContext' target/xtensa/cpu.h:339: note: previous declaration of 'DisasContext' was here

Remove the now-redundant typedef from the definition of the struct in translate.c.

---

...applied to master as a buildfix.

-- PMM