]> granicus.if.org Git - gc/commitdiff
Prevent compiler warning in GC_print_callers (regarding 'pipe' variable)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 23 Jan 2012 15:14:15 +0000 (19:14 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 23 Jan 2012 15:14:15 +0000 (19:14 +0400)
* os_dep.c (GC_print_callers): Declare "pipe" local variable only if
used.

os_dep.c

index 27af6c97ee2f12bad8f96a1b5f136fa5ee742b59..c495ff0d805ac276b8ce4d58b154594ef5af13f8 100644 (file)
--- 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