1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

addr2line.c: fix -Wmaybe-uninitialized

../addr2line.c: In function ‘fill_lines’:
../addr2line.c:709:8: warning: ‘file’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (file != NULL) {
        ^
../addr2line.c:535:11: warning: ‘filesize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     off_t filesize;
           ^~~~~~~~

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-09-16 13:22:00 +00:00
parent 1a6c27346e
commit af0e536d03

View file

@ -532,8 +532,8 @@ fill_lines(int num_traces, void **traces, int check_debuglink,
ElfW(Shdr) *shdr, *shstr_shdr;
ElfW(Shdr) *debug_line_shdr = NULL, *gnu_debuglink_shdr = NULL;
int fd;
off_t filesize;
char *file;
off_t filesize = 0;
char *file = NULL;
ElfW(Shdr) *symtab_shdr = NULL, *strtab_shdr = NULL;
ElfW(Shdr) *dynsym_shdr = NULL, *dynstr_shdr = NULL;
obj_info_t *obj = *objp;