From: Christoph Egger Date: Thu, 26 May 2011 14:55:22 +0000 (+0100) Subject: libxl: fix build failure (unused variables) for non-Linux platforms X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10275 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=beb998ac7642953d2497a66a5ba552f6cd9b3aae;p=xen.git 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 Acked-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/libxl/libxl_exec.c b/tools/libxl/libxl_exec.c index 27fd6cd600..87715c6501 100644 --- a/tools/libxl/libxl_exec.c +++ b/tools/libxl/libxl_exec.c @@ -41,8 +41,6 @@ static void check_open_fds(const char *what) 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 @@ static void check_open_fds(const char *what) 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 ) {