I'm getting this error with 0.172:
dwarf_getsrclines.c: In function 'read_srclines':
dwarf_getsrclines.c:1074:7: error: 'filelist' may be used uninitialized in this function [-Werror=maybe-uninitialized]
free (filelist);
^~~~~~~~~~~~~~~
It seems that gcc is right here as there is "ifs" that go to "out"
(where filelist is freed) before freelist is initialized.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
+2018-06-17 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+
+ * dwarf_getsrclines.c (read_srclines): Intialize filelist early.
+
2018-06-15 Mark Wielaard <mark@klomp.org>
* dwarf_getlocation.c (check_constant_offset): Clarify DW_FORM_data16
{
int res = -1;
+ struct filelist *filelist = NULL;
size_t nfilelist = 0;
size_t ndirlist = 0;
},
.next = NULL
};
- struct filelist *filelist = &null_file;
+ filelist = &null_file;
nfilelist = 1;
/* Allocate memory for a new file. For the first MAX_STACK_FILES