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

[Xen-changelog] [xen-unstable] libxl: fix build failure (unused variables) for non-Linux platforms



# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1306421722 -3600
# Node ID 99e599644e12a7e8fded4cc8e4494ee861d3800a
# Parent  276565f729d5e7f4506aa002b7bc312fc3a358f3
libxl: fix build failure (unused variables) for non-Linux platforms

Move variable definitions into Linux-specific sections where they are
actually used. Fixes warning about unused variables.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 276565f729d5 -r 99e599644e12 tools/libxl/libxl_exec.c
--- a/tools/libxl/libxl_exec.c  Thu May 26 15:43:22 2011 +0100
+++ b/tools/libxl/libxl_exec.c  Thu May 26 15:55:22 2011 +0100
@@ -41,8 +41,6 @@
     const char *env_debug;
     int debug;
     int i, flags, badness = 0;
-    char path[PATH_MAX];
-    char link[PATH_MAX+1];
 
     env_debug = getenv("_LIBXL_DEBUG_EXEC_FDS");
     if (!env_debug) return;
@@ -53,6 +51,8 @@
     for (i = 4; i < 256; i++) {
 #ifdef __linux__
         size_t len;
+        char path[PATH_MAX];
+        char link[PATH_MAX+1];
 #endif
         flags = fcntl(i, F_GETFD);
         if ( flags == -1 ) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.