Permalink
Browse files

Prevent compiler warning in GC_print_callers (regarding 'pipe' variable)

* os_dep.c (GC_print_callers): Declare "pipe" local variable only if
used.
  • Loading branch information...
1 parent 8b4a394 commit 53a93bcbd2c14292107ee2afbb25303e5a8a8fde @ivmai ivmai committed Jan 23, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 os_dep.c
View
@@ -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

0 comments on commit 53a93bc

Please sign in to comment.