Re: [spice-server 1/3] Remove duplicate typedef from headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 30, 2016 at 01:38:20PM +0200, Pavel Grunt wrote:
> Hi,
> 
> I agree that there should be the only one typedef. But I don't
> understand why not to include the needed header directly. We should try
> to "untagle" these header dependencies.

OH from my side I don't mind adding the headers directly to make the
dep more explicit.

Christophe

> 
> Pavel
> 
> On Wed, 2016-03-30 at 11:46 +0200, Christophe Fergeau wrote:
> > This is causing compile errors with older gcc versions.
> > 
> > reds.h includes reds-stream.h through red-channel.h so it will get
> > the
> > RedsState typedef this way.
> > 
> > red-qxl.h includes spice-qxl.h through red-channel.h and then
> > spice.h,
> > so it will get the QXLState typedef this way.
> > ---
> >  server/red-qxl.h | 2 --
> >  server/reds.h    | 2 --
> >  2 files changed, 4 deletions(-)
> > 
> > diff --git a/server/red-qxl.h b/server/red-qxl.h
> > index b1ebbe1..ce80f97 100644
> > --- a/server/red-qxl.h
> > +++ b/server/red-qxl.h
> > @@ -20,8 +20,6 @@
> >  
> >  #include "red-channel.h"
> >  
> > -typedef struct QXLState QXLState;
> > -
> >  typedef struct AsyncCommand AsyncCommand;
> >  
> >  void red_qxl_init(SpiceServer *reds, QXLInstance *qxl);
> > diff --git a/server/reds.h b/server/reds.h
> > index 5966dc3..c2968c2 100644
> > --- a/server/reds.h
> > +++ b/server/reds.h
> > @@ -31,8 +31,6 @@
> >  #include "main-dispatcher.h"
> >  #include "migration-protocol.h"
> >  
> > -typedef struct RedsState RedsState;
> > -
> >  static inline QXLInterface * qxl_get_interface(QXLInstance *qxl)
> >  {
> >      return SPICE_CONTAINEROF(qxl->base.sif, QXLInterface, base);
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]