[Spice-devel] [PATCH 1/2] replay: do not define same type twice

Frediano Ziglio fziglio at redhat.com
Tue Sep 1 09:17:42 PDT 2015


Avoid to use typedef twice for the same type as some compiler
complaints about it.
SpiceTimer and SpiceWatch are defined in server/spice-core.h
as an abstract type which should be defined by some code (as
server/tests/basic_event_loop.c does).

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/tests/basic_event_loop.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/tests/basic_event_loop.c b/server/tests/basic_event_loop.c
index e692f3a..89e05ad 100644
--- a/server/tests/basic_event_loop.c
+++ b/server/tests/basic_event_loop.c
@@ -22,11 +22,11 @@ int debug = 0;
 #define NOT_IMPLEMENTED printf("%s not implemented\n", __func__);
 
 
-typedef struct SpiceTimer {
+struct SpiceTimer {
     SpiceTimerFunc func;
     void *opaque;
     guint source_id;
-} SpiceTimer;
+};
 
 static SpiceTimer* timer_add(SpiceTimerFunc func, void *opaque)
 {
@@ -71,12 +71,12 @@ static void timer_remove(SpiceTimer *timer)
     g_free(timer);
 }
 
-typedef struct SpiceWatch {
+struct SpiceWatch {
     void *opaque;
     guint source_id;
     GIOChannel *channel;
     SpiceWatchFunc func;
-} SpiceWatch;
+};
 
 static GIOCondition spice_event_to_condition(int event_mask)
 {
-- 
2.4.3



More information about the Spice-devel mailing list