This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] libxl: fix build failure (unused variable

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: fix build failure (unused variables) for non-Linux platforms
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 11:12:00 +0100
Delivery-date: Thu, 16 Jun 2011 03:19:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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];
         flags = fcntl(i, F_GETFD);
         if ( flags == -1 ) {

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: fix build failure (unused variables) for non-Linux platforms, Xen patchbot-unstable <=