From 53a93bcbd2c14292107ee2afbb25303e5a8a8fde Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 23 Jan 2012 19:14:15 +0400 Subject: [PATCH] Prevent compiler warning in GC_print_callers (regarding 'pipe' variable) * os_dep.c (GC_print_callers): Declare "pipe" local variable only if used. --- os_dep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/os_dep.c b/os_dep.c index 27af6c97..c495ff0d 100644 --- a/os_dep.c +++ b/os_dep.c @@ -4610,9 +4610,6 @@ GC_INNER void GC_print_callers(struct callinfo info[NFRAMES]) continue; } { -# ifdef LINUX - FILE *pipe; -# endif # if defined(GC_HAVE_BUILTIN_BACKTRACE) \ && !defined(GC_BACKTRACE_SYMBOLS_BROKEN) char **sym_name = @@ -4626,6 +4623,7 @@ GC_INNER void GC_print_callers(struct callinfo info[NFRAMES]) # if defined(LINUX) && !defined(SMALL_CONFIG) /* Try for a line number. */ { + FILE *pipe; # define EXE_SZ 100 static char exe_name[EXE_SZ]; # define CMD_SZ 200 -- 2.40.0