Skip to contentSkip to conversation

cuda.h: Fix multiple typedef

PATCH In review Dr. David Alan Gilbert (git) 4 participants 4 messages Feb 16, 2018 – Feb 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cuda.h: Fix multiple typedef

From: "Dr. David Alan Gilbert" <[email protected]>

RHEL6's compilers don't like the repeated typedef.

---
 include/hw/misc/macio/cuda.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/hw/misc/macio/cuda.h +2 -2
index 6afbdd13ee..494b709579 100644
@@ -93,12 +93,12 @@ typedef struct CUDAState {
 } CUDAState;
 
 /* MOS6522 CUDA */
-typedef struct MOS6522CUDAState {
+struct MOS6522CUDAState {
     /*< private >*/
     MOS6522State parent_obj;
 
     CUDAState *cuda;
-} MOS6522CUDAState;
+};
 
 #define TYPE_MOS6522_CUDA "mos6522-cuda"
 #define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
Signature · 1 line
2.14.3
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

RHEL6's compilers don't like the repeated typedef.

Quoted 24 lines
---
 include/hw/misc/macio/cuda.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/hw/misc/macio/cuda.h +2 -2
index 6afbdd13ee..494b709579 100644
@@ -93,12 +93,12 @@ typedef struct CUDAState {
 } CUDAState;
 
 /* MOS6522 CUDA */
-typedef struct MOS6522CUDAState {
+struct MOS6522CUDAState {
     /*< private >*/
     MOS6522State parent_obj;
 
     CUDAState *cuda;
-} MOS6522CUDAState;
+};
 
 #define TYPE_MOS6522_CUDA "mos6522-cuda"
 #define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
#2 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 19 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

RHEL6's compilers don't like the repeated typedef.

---
 include/hw/misc/macio/cuda.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/hw/misc/macio/cuda.h +1 -1
index 6afbdd13ee..494b709579 100644
@@ -93,12 +93,12 @@ typedef struct CUDAState {
 } CUDAState;
 
 /* MOS6522 CUDA */
-typedef struct MOS6522CUDAState {
+struct MOS6522CUDAState {

include/hw/misc/macio/cuda.h typedef struct CUDAState {

Quoted 10 lines
include/hw/misc/macio/cuda.h +1 -2
     /*< private >*/
     MOS6522State parent_obj;
 
     CUDAState *cuda;
-} MOS6522CUDAState;
+};
 
 #define TYPE_MOS6522_CUDA "mos6522-cuda"
 #define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
--

Thanks; applied to master as a buildfix.

-- PMM

#3 lore raw
Quoted 28 lines · Peter Maydell
Quoted 26 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

RHEL6's compilers don't like the repeated typedef.

---
  include/hw/misc/macio/cuda.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
include/hw/misc/macio/cuda.h +2 -2
index 6afbdd13ee..494b709579 100644
@@ -93,12 +93,12 @@ typedef struct CUDAState {
  } CUDAState;
 
  /* MOS6522 CUDA */
-typedef struct MOS6522CUDAState {
+struct MOS6522CUDAState {
      /*< private >*/
      MOS6522State parent_obj;
 
      CUDAState *cuda;
-} MOS6522CUDAState;
+};
 
Quoted 5 lines

include/hw/misc/macio/cuda.h typedef struct CUDAState {

Quoted 3 lines
include/hw/misc/macio/cuda.h +0 -1
  #define TYPE_MOS6522_CUDA "mos6522-cuda"
  #define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
--

Thanks; applied to master as a buildfix.

Thanks both. Apologies I got caught up later than expected yesterday.

ATB,

Mark.