summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7f40999)
GCC 4.4.7 isn't smart enough to realize own_libsym will always be zero
when it sees the goto done which might jump over the initialization of
libsym. And so will produce a warning like:
cc1: warnings being treated as errors
trace.c: In function ‘ifunc_ret_hit’:
trace.c:1433: error: ‘libsym’ may be used uninitialized in this function
struct breakpoint *nbp = NULL;
int own_libsym = 0;
struct breakpoint *nbp = NULL;
int own_libsym = 0;
+ struct library_symbol *libsym = NULL;
struct value value;
value_init(&value, proc, NULL, type_get_voidptr(), 0);
struct value value;
value_init(&value, proc, NULL, type_get_voidptr(), 0);
/* Look if we already have a symbol with this address.
* Otherwise create a new one. */
/* Look if we already have a symbol with this address.
* Otherwise create a new one. */
- struct library_symbol *libsym
- = library_each_symbol(lib, NULL, libsym_at_address, &u.a);
+ libsym = library_each_symbol(lib, NULL, libsym_at_address, &u.a);
if (libsym == NULL) {
libsym = malloc(sizeof *libsym);
char *name = strdup(bp->os.ret_libsym->name);
if (libsym == NULL) {
libsym = malloc(sizeof *libsym);
char *name = strdup(bp->os.ret_libsym->name);