mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
validate: fix build warning in generate_unwind_trace()
The unw_word_t type has different sizes for 32-bit and 64-bit, so using the %lx format specifier on a 32-bit CPU leads to the following compile warning: CC libgstvalidate_1.0_la-gst-validate-report.lo gst-validate-report.c: In function 'generate_unwind_trace': gst-validate-report.c:137:36: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'unw_word_t {aka unsigned int}' [-Werror=format=] g_string_append_printf (trace, "%s (0x%lx)\n", name, offset); Cast to long so the %lx fomart specifier can be always used.
This commit is contained in:
parent
6c37fa7110
commit
6110ecdc9b
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ generate_unwind_trace (void)
|
|||
|
||||
unw_word_t offset;
|
||||
unw_get_proc_name (&cursor, name, sizeof (name), &offset);
|
||||
g_string_append_printf (trace, "%s (0x%lx)\n", name, offset);
|
||||
g_string_append_printf (trace, "%s (0x%lx)\n", name, (long) offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue