# New Ticket Created by NotFound # Please include the string: [perl #55296] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=55296 >
The attached patch fix a warning in optimized build in src/exceptions.c:Parrot_print_backtrace by moving a variable declaration inside the conditional branch that uses it. -- Salu2
Index: src/exceptions.c =================================================================== --- src/exceptions.c (revisión: 28068) +++ src/exceptions.c (copia de trabajo) @@ -1025,7 +1025,6 @@ size_t i; const size_t size = backtrace(array, BACKTRACE_DEPTH); - char ** strings; fprintf(stderr, "Backtrace - Obtained %zd stack frames (max trace depth is %d).\n", @@ -1048,11 +1047,13 @@ } } # else - strings = backtrace_symbols(array, size); - for (i = 0; i < size; i++) - fprintf(stderr, "%s\n", strings[i]); + { /* Scope for strings */ + char ** strings = backtrace_symbols(array, size); + for (i = 0; i < size; i++) + fprintf(stderr, "%s\n", strings[i]); - mem_sys_free(strings); + mem_sys_free(strings); + } # endif # undef BACKTRACE_DEPTH