[Spice-devel] [spice-gtk 3/5] controller: Add missing #ifdef WIN32 in test

Christophe Fergeau cfergeau at redhat.com
Mon Jan 6 03:25:11 PST 2014


The spicec_pid variable is only used in a #ifdef WIN32 block, but it was
unconditionnally declared/initialized. This causes a gcc warning.
---
 gtk/controller/test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gtk/controller/test.c b/gtk/controller/test.c
index dffc7af..c7ae8f0 100644
--- a/gtk/controller/test.c
+++ b/gtk/controller/test.c
@@ -205,7 +205,9 @@ void connect_signals (gpointer obj)
 
 int main (int argc, char *argv[])
 {
+#ifdef WIN32
     int spicec_pid = (argc > 1 ? atoi (argv[1]) : 0);
+#endif
     char* host = (argc > 2 ? argv[2] : (char*)HOST);
     int port = (argc > 3 ? atoi (argv[3]) : PORT);
     char pipe_name[PIPE_NAME_MAX_LEN];
-- 
1.8.4.2



More information about the Spice-devel mailing list