Skip to contentSkip to conversation

ppc/pnv: fix PnvChip redefinition in <hw/ppc/pnv_xscom.h>

PATCH Applied Cédric Le Goater 3 participants 3 messages Jan 19, 2018 – Jan 21, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc/pnv: fix PnvChip redefinition in <hw/ppc/pnv_xscom.h>

This redefinition generates warnings on some clang compilers and older gcc4.4.

...include/hw/ppc/pnv_xscom.h:24:24: warning: redefinition of typedef 'PnvChip' is a C11
feature [-Wtypedef-redefinition]

typedef struct PnvChip PnvChip;
                       ^

...include/hw/ppc/pnv.h:65:3: note: previous definition is here } PnvChip;
^
1 warning generated.
CC ppc64-softmmu/hw/ppc/pnv_xscom.o

---
 include/hw/ppc/pnv_xscom.h | 2 --
 1 file changed, 2 deletions(-)
include/hw/ppc/pnv_xscom.h +0 -2
index fb1bd5df095a..255b26a5aaf6 100644
@@ -21,8 +21,6 @@
 
 #include "qom/object.h"
 
-typedef struct PnvChip PnvChip;
-
 typedef struct PnvXScomInterface {
     Object parent;
 } PnvXScomInterface;
Signature · 1 line
2.13.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · Cédric Le Goater

This redefinition generates warnings on some clang compilers and older gcc4.4.

...include/hw/ppc/pnv_xscom.h:24:24: warning: redefinition of typedef 'PnvChip' is a C11
feature [-Wtypedef-redefinition]

typedef struct PnvChip PnvChip;
                       ^

...include/hw/ppc/pnv.h:65:3: note: previous definition is here } PnvChip;
^
1 warning generated.
CC ppc64-softmmu/hw/ppc/pnv_xscom.o

---
 include/hw/ppc/pnv_xscom.h | 2 --
 1 file changed, 2 deletions(-)
include/hw/ppc/pnv_xscom.h +0 -0
index fb1bd5df095a..255b26a5aaf6 100644

include/hw/ppc/pnv_xscom.h line 26

Quoted 8 lines
include/hw/ppc/pnv_xscom.h +0 -2
@@ -21,8 +21,6 @@
 
 #include "qom/object.h"
 
-typedef struct PnvChip PnvChip;
-
 typedef struct PnvXScomInterface {
     Object parent;
 } PnvXScomInterface;
Applied
#2 lore raw
In reply to Cédric Le Goater
Quoted 7 lines · Cédric Le Goater

This redefinition generates warnings on some clang compilers and older gcc4.4.

...include/hw/ppc/pnv_xscom.h:24:24: warning: redefinition of typedef 'PnvChip' is a C11
feature [-Wtypedef-redefinition]

typedef struct PnvChip PnvChip;
                       ^
Quoted 7 lines

...include/hw/ppc/pnv.h:65:3: note: previous definition is here } PnvChip;
^
1 warning generated.
CC ppc64-softmmu/hw/ppc/pnv_xscom.o

Applied, thanks.

Quoted 17 lines
---
 include/hw/ppc/pnv_xscom.h | 2 --
 1 file changed, 2 deletions(-)
include/hw/ppc/pnv_xscom.h +0 -2
index fb1bd5df095a..255b26a5aaf6 100644
@@ -21,8 +21,6 @@
 
 #include "qom/object.h"
 
-typedef struct PnvChip PnvChip;
-
 typedef struct PnvXScomInterface {
     Object parent;
 } PnvXScomInterface;
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson