[Spice-devel] server: Duplicate typedef definitions are not allowed in C99

Frediano Ziglio fziglio at redhat.com
Mon Nov 16 02:37:38 PST 2015


> 
> On Sun, Nov 15, 2015 at 7:47 PM, Francois Gouget
> <fgouget at codeweavers.com> wrote:
> > This fixes some compilation errors with gcc 4.4.7 on RHEL 6.
> >
> > Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> > ---
> >  server/red_channel.h    | 1 -
> >  server/red_dispatcher.h | 1 -
> >  server/red_worker.c     | 4 ++--
> >  3 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/server/red_channel.h b/server/red_channel.h
> > index eda4436..4deecb6 100644
> > --- a/server/red_channel.h
> > +++ b/server/red_channel.h
> > @@ -128,7 +128,6 @@ typedef struct OutgoingHandler {
> >
> >  /* Red Channel interface */
> >
> > -typedef struct RedsStream RedsStream;
> >  typedef struct RedChannel RedChannel;
> >  typedef struct RedChannelClient RedChannelClient;
> >  typedef struct RedClient RedClient;
> > diff --git a/server/red_dispatcher.h b/server/red_dispatcher.h
> > index 02337b8..fef067c 100644
> > --- a/server/red_dispatcher.h
> > +++ b/server/red_dispatcher.h
> > @@ -23,7 +23,6 @@
> >  #include "red_channel.h"
> >
> >  typedef struct RedDispatcher RedDispatcher;
> > -typedef struct RedChannelClient RedChannelClient;
> >
> >  typedef struct AsyncCommand AsyncCommand;
> >
> > diff --git a/server/red_worker.c b/server/red_worker.c
> > index 9673288..165e4c0 100644
> > --- a/server/red_worker.c
> > +++ b/server/red_worker.c
> > @@ -233,7 +233,7 @@ typedef struct RedSurface {
> >      QXLReleaseInfoExt create, destroy;
> >  } RedSurface;
> >
> > -typedef struct RedWorker {
> > +struct RedWorker {
> >      pthread_t thread;
> >      clockid_t clockid;
> >      QXLInstance *qxl;
> > @@ -290,7 +290,7 @@ typedef struct RedWorker {
> >      int driver_cap_monitors_config;
> >
> >      FILE *record_fd;
> > -} RedWorker;
> > +};
> >
> >  typedef enum {
> >      BITMAP_DATA_TYPE_INVALID,
> > --
> > 2.6.2
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
> Looks good, ACK!

Merged

Frediano


More information about the Spice-devel mailing list