[PATCH vdagent 2/2] vdagentd: Fix building warning

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

 



Move some variable declarations to right place.

Signed-off-by: Dunrong Huang <riegamaths@xxxxxxxxx>
---
 src/vdagentd.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/vdagentd.c b/src/vdagentd.c
index 7006d80..a51ac4c 100644
--- a/src/vdagentd.c
+++ b/src/vdagentd.c
@@ -510,10 +510,9 @@ void release_clipboards(void)
 
 void update_active_session_connection(void)
 {
-    struct udscs_connection *new_conn = NULL;
-    int n;
-
 #ifdef HAVE_SESSION_INFO
+    int n;
+    struct udscs_connection *new_conn = NULL;
     if (!active_session)
         active_session = session_info_get_active_session(session_info);
 
@@ -541,7 +540,9 @@ void update_active_session_connection(void)
 
 void agent_connect(struct udscs_connection *conn)
 {
+#ifdef HAVE_SESSION_INFO
     uint32_t pid;
+#endif
     struct agent_data *agent_data;
 
     agent_data = calloc(1, sizeof(*agent_data));
@@ -707,7 +708,10 @@ void daemonize(void)
 void main_loop(void)
 {
     fd_set readfds, writefds;
-    int n, nfds, ck_fd = 0;
+    int n, nfds;
+#ifdef HAVE_SESSION_INFO
+    int ck_fd = 0;
+#endif
 
     while (!quit) {
         FD_ZERO(&readfds);
-- 
1.8.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]