From: Ivan Maidanski Date: Mon, 23 Jan 2012 15:14:15 +0000 (+0400) Subject: Prevent compiler warning in GC_print_callers (regarding 'pipe' variable) X-Git-Tag: gc7_3alpha2~198 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53a93bcbd2c14292107ee2afbb25303e5a8a8fde;p=gc Prevent compiler warning in GC_print_callers (regarding 'pipe' variable) * os_dep.c (GC_print_callers): Declare "pipe" local variable only if used. --- 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