mirror of
https://github.com/ianlancetaylor/libbacktrace.git
synced 2026-03-28 21:19:06 +08:00
libbacktrace: avoid -Wpointer-arith errors
Based on patch from Kirill Müller. * configure.ac (ACX_PROG_CC_WARNING_OPTS): Add -Wpointer-arith. * pecoff.c (coff_add): Cast void pointers. * xcoff.c (xcoff_add): Likewise. * configure: Regenerate.
This commit is contained in:
4
xcoff.c
4
xcoff.c
@@ -1200,7 +1200,9 @@ xcoff_add (struct backtrace_state *state, int descriptor, off_t offset,
|
||||
goto fail;
|
||||
syms_view_valid = 1;
|
||||
|
||||
memcpy (&str_size, syms_view.data + syms_size, 4);
|
||||
memcpy (&str_size,
|
||||
(const unsigned char *) syms_view.data + syms_size,
|
||||
4);
|
||||
|
||||
str_off = fhdr.f_symptr + syms_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user