All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-3.1?] hw/arm/aspeed: Fix build issue with clang 3.4
@ 2018-11-28  9:35 Thomas Huth
  2018-11-28 13:09 ` Cédric Le Goater
  2018-11-28 15:32 ` Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2018-11-28  9:35 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel
  Cc: Cédric Le Goater, Andrew Jeffery, Joel Stanley, qemu-arm

When using clang 3.4.2, compilation of QEMU fails like this:

  CC      aarch64-softmmu/hw/arm/aspeed.o
hw/arm/aspeed.c:36:3: error: redefinition of typedef 'AspeedBoardState' is a C11
      feature [-Werror,-Wtypedef-redefinition]
} AspeedBoardState;
  ^
include/hw/arm/aspeed.h:14:33: note: previous definition is here
typedef struct AspeedBoardState AspeedBoardState;
                                ^
1 error generated.
make[1]: *** [hw/arm/aspeed.o] Error 1
make: *** [subdir-aarch64-softmmu] Error 2

Remove the duplicated typedef to fix this issue.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/aspeed.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 6b33ecd..5158985 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -29,11 +29,11 @@ static struct arm_boot_info aspeed_board_binfo = {
     .nb_cpus = 1,
 };
 
-typedef struct AspeedBoardState {
+struct AspeedBoardState {
     AspeedSoCState soc;
     MemoryRegion ram;
     MemoryRegion max_ram;
-} AspeedBoardState;
+};
 
 /* Palmetto hardware value: 0x120CE416 */
 #define PALMETTO_BMC_HW_STRAP1 (                                        \
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH for-3.1?] hw/arm/aspeed: Fix build issue with clang 3.4
  2018-11-28  9:35 [Qemu-devel] [PATCH for-3.1?] hw/arm/aspeed: Fix build issue with clang 3.4 Thomas Huth
@ 2018-11-28 13:09 ` Cédric Le Goater
  2018-11-28 15:32 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Cédric Le Goater @ 2018-11-28 13:09 UTC (permalink / raw)
  To: Thomas Huth, Peter Maydell, qemu-devel
  Cc: Andrew Jeffery, Joel Stanley, qemu-arm

Hello Thomas,

On 11/28/18 10:35 AM, Thomas Huth wrote:
> When using clang 3.4.2, compilation of QEMU fails like this:
> 
>   CC      aarch64-softmmu/hw/arm/aspeed.o
> hw/arm/aspeed.c:36:3: error: redefinition of typedef 'AspeedBoardState' is a C11
>       feature [-Werror,-Wtypedef-redefinition]
> } AspeedBoardState;
>   ^
> include/hw/arm/aspeed.h:14:33: note: previous definition is here
> typedef struct AspeedBoardState AspeedBoardState;
>                                 ^
> 1 error generated.
> make[1]: *** [hw/arm/aspeed.o] Error 1
> make: *** [subdir-aarch64-softmmu] Error 2
> 
> Remove the duplicated typedef to fix this issue.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

yes. May be for 3.1. 

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.


> ---
>  hw/arm/aspeed.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 6b33ecd..5158985 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -29,11 +29,11 @@ static struct arm_boot_info aspeed_board_binfo = {
>      .nb_cpus = 1,
>  };
>  
> -typedef struct AspeedBoardState {
> +struct AspeedBoardState {
>      AspeedSoCState soc;
>      MemoryRegion ram;
>      MemoryRegion max_ram;
> -} AspeedBoardState;
> +};
>  
>  /* Palmetto hardware value: 0x120CE416 */
>  #define PALMETTO_BMC_HW_STRAP1 (                                        \
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH for-3.1?] hw/arm/aspeed: Fix build issue with clang 3.4
  2018-11-28  9:35 [Qemu-devel] [PATCH for-3.1?] hw/arm/aspeed: Fix build issue with clang 3.4 Thomas Huth
  2018-11-28 13:09 ` Cédric Le Goater
@ 2018-11-28 15:32 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2018-11-28 15:32 UTC (permalink / raw)
  To: Thomas Huth
  Cc: QEMU Developers, Cédric Le Goater, Andrew Jeffery,
	Joel Stanley, qemu-arm

On Wed, 28 Nov 2018 at 09:35, Thomas Huth <thuth@redhat.com> wrote:
>
> When using clang 3.4.2, compilation of QEMU fails like this:
>
>   CC      aarch64-softmmu/hw/arm/aspeed.o
> hw/arm/aspeed.c:36:3: error: redefinition of typedef 'AspeedBoardState' is a C11
>       feature [-Werror,-Wtypedef-redefinition]
> } AspeedBoardState;
>   ^
> include/hw/arm/aspeed.h:14:33: note: previous definition is here
> typedef struct AspeedBoardState AspeedBoardState;
>                                 ^
> 1 error generated.
> make[1]: *** [hw/arm/aspeed.o] Error 1
> make: *** [subdir-aarch64-softmmu] Error 2
>
> Remove the duplicated typedef to fix this issue.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>


Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-28 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28  9:35 [Qemu-devel] [PATCH for-3.1?] hw/arm/aspeed: Fix build issue with clang 3.4 Thomas Huth
2018-11-28 13:09 ` Cédric Le Goater
2018-11-28 15:32 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.