summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-16 13:22:00 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-16 13:22:00 (GMT)
commitaf0e536d034a712c8de3d92f9bb3bfb730795d27 (patch)
treec50e16a43d47bd195b97d59809f1c0af9f3cb1af /addr2line.c
parent1a6c27346e02a497b5e3cfca8d7e6e77248a3f38 (diff)
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
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/addr2line.c b/addr2line.c
index b266e44..9220a0e 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -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;