[Spice-devel,spice-server] Avoid to typedef twice SmartCardChannelClient

Submitted by Francois Gouget on Oct. 17, 2016, 2:17 p.m.

Details

Message ID E1bw8ir-0004vG-05@amboise
State New
Headers show

Not browsing as part of any series.

Patch hide | download patch | download mbox

diff --git a/server/smartcard-channel-client.h b/server/smartcard-channel-client.h
index 4fe1c72..606a95e 100644
--- a/server/smartcard-channel-client.h
+++ b/server/smartcard-channel-client.h
@@ -37,7 +37,6 @@  G_BEGIN_DECLS
 #define SMARTCARD_CHANNEL_CLIENT_GET_CLASS(obj) \
     (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_SMARTCARD_CHANNEL_CLIENT, SmartCardChannelClientClass))
 
-typedef struct SmartCardChannelClient SmartCardChannelClient;
 typedef struct SmartCardChannelClientClass SmartCardChannelClientClass;
 typedef struct SmartCardChannelClientPrivate SmartCardChannelClientPrivate;
 

Comments

> 
> SmartCardChannelClient is already defined in smartcard.h which
> is included in the smartcard-channel-client.h header.
> 
> Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
> ---
> 
> This patch series is nice and really does help.
> I would add this patch to it.
> 

Is there something missing?

>  server/smartcard-channel-client.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/server/smartcard-channel-client.h
> b/server/smartcard-channel-client.h
> index 4fe1c72..606a95e 100644
> --- a/server/smartcard-channel-client.h
> +++ b/server/smartcard-channel-client.h
> @@ -37,7 +37,6 @@ G_BEGIN_DECLS
>  #define SMARTCARD_CHANNEL_CLIENT_GET_CLASS(obj) \
>      (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_SMARTCARD_CHANNEL_CLIENT,
>      SmartCardChannelClientClass))
>  
> -typedef struct SmartCardChannelClient SmartCardChannelClient;
>  typedef struct SmartCardChannelClientClass SmartCardChannelClientClass;
>  typedef struct SmartCardChannelClientPrivate SmartCardChannelClientPrivate;
>  

Yes, this class it's kind of my 10/10, by our "rules" SmartCardChannelClient
should be defined here but it clash with other headers.

I would ack it and consider a temporary workaround till we decide
a final rule or way to handle these. At least this change is quite minimal.

Frediano