[Qemu-devel] [PATCH] ppc/pnv: fix PnvChip redefinition in <hw/ppc/pnv_xscom.h>

Cédric Le Goater posted 1 patch 6 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180119081511.24010-1-clg@kaod.org
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test ppc passed
Test s390x passed
include/hw/ppc/pnv_xscom.h | 2 --
1 file changed, 2 deletions(-)
[Qemu-devel] [PATCH] ppc/pnv: fix PnvChip redefinition in <hw/ppc/pnv_xscom.h>
Posted by Cédric Le Goater 6 years, 3 months ago
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

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 include/hw/ppc/pnv_xscom.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
index fb1bd5df095a..255b26a5aaf6 100644
--- a/include/hw/ppc/pnv_xscom.h
+++ b/include/hw/ppc/pnv_xscom.h
@@ -21,8 +21,6 @@
 
 #include "qom/object.h"
 
-typedef struct PnvChip PnvChip;
-
 typedef struct PnvXScomInterface {
     Object parent;
 } PnvXScomInterface;
-- 
2.13.6


Re: [Qemu-devel] [PATCH] ppc/pnv: fix PnvChip redefinition in <hw/ppc/pnv_xscom.h>
Posted by Thomas Huth 6 years, 3 months ago
On 19.01.2018 09:15, Cédric Le Goater wrote:
> 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
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>  include/hw/ppc/pnv_xscom.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
> index fb1bd5df095a..255b26a5aaf6 100644
> --- a/include/hw/ppc/pnv_xscom.h
> +++ b/include/hw/ppc/pnv_xscom.h
> @@ -21,8 +21,6 @@
>  
>  #include "qom/object.h"
>  
> -typedef struct PnvChip PnvChip;
> -
>  typedef struct PnvXScomInterface {
>      Object parent;
>  } PnvXScomInterface;
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

Re: [Qemu-devel] [PATCH] ppc/pnv: fix PnvChip redefinition in <hw/ppc/pnv_xscom.h>
Posted by David Gibson 6 years, 2 months ago
On Fri, Jan 19, 2018 at 09:15:11AM +0100, Cédric Le Goater wrote:
> 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
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

Applied, thanks.

> ---
>  include/hw/ppc/pnv_xscom.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
> index fb1bd5df095a..255b26a5aaf6 100644
> --- a/include/hw/ppc/pnv_xscom.h
> +++ b/include/hw/ppc/pnv_xscom.h
> @@ -21,8 +21,6 @@
>  
>  #include "qom/object.h"
>  
> -typedef struct PnvChip PnvChip;
> -
>  typedef struct PnvXScomInterface {
>      Object parent;
>  } PnvXScomInterface;

-- 
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