From: Nicolas Dufresne Date: Fri, 14 Oct 2016 14:52:53 +0000 (-0400) Subject: Fix non-C89 code X-Git-Tag: 1.19.3~491^2~915 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fcc6ce45247d6893031f7c6c13b07dc289f1059;p=platform%2Fupstream%2Fgstreamer.git Fix non-C89 code In the automake build system we force C89 which does not allow mixing code and declaration. --- diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index 6d7a431..410015b 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -75,6 +75,10 @@ append_debug_info (GString * trace, const void *ip) { char *debuginfo_path = NULL; + Dwarf_Addr addr; + Dwfl_Module *module; + const char *function_name; + Dwfl_Line *line; Dwfl_Callbacks callbacks = { .find_elf = dwfl_linux_proc_find_elf, @@ -83,20 +87,21 @@ append_debug_info (GString * trace, const void *ip) }; Dwfl *dwfl = dwfl_begin (&callbacks); + assert (dwfl != NULL); assert (dwfl_linux_proc_report (dwfl, getpid ()) == 0); assert (dwfl_report_end (dwfl, NULL, NULL) == 0); - Dwarf_Addr addr = (uintptr_t) ip; + addr = (uintptr_t) ip; - Dwfl_Module *module = dwfl_addrmodule (dwfl, addr); + module = dwfl_addrmodule (dwfl, addr); - const char *function_name = dwfl_module_addrname (module, addr); + function_name = dwfl_module_addrname (module, addr); g_string_append_printf (trace, "%s(", function_name ? function_name : "??"); - Dwfl_Line *line = dwfl_getsrc (dwfl, addr); + line = dwfl_getsrc (dwfl, addr); if (line != NULL) { int nline; Dwarf_Addr addr;