diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-20 17:28:05 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-20 17:28:05 +0000 |
commit | d80b0ad4703f23e31645da9a0ce1c8fa955ce225 (patch) | |
tree | 5d9cd4197f022cb233bb0c912c217f3dcc0bb7b2 /libbacktrace | |
parent | 854ca8f743fae0e9779fd4879d630895cd4a089f (diff) | |
download | gcc-d80b0ad4703f23e31645da9a0ce1c8fa955ce225.tar.gz |
* dwarf.c (read_attribute): Always clear val.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193670 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libbacktrace')
-rw-r--r-- | libbacktrace/ChangeLog | 4 | ||||
-rw-r--r-- | libbacktrace/dwarf.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index fc5871ad30d..7d2cfda88b9 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,7 @@ +2012-11-20 Ian Lance Taylor <iant@google.com> + + * dwarf.c (read_attribute): Always clear val. + 2012-11-13 Ian Lance Taylor <iant@google.com> PR other/55312 diff --git a/libbacktrace/dwarf.c b/libbacktrace/dwarf.c index b198dea38dc..bd7419b9c9a 100644 --- a/libbacktrace/dwarf.c +++ b/libbacktrace/dwarf.c @@ -654,6 +654,12 @@ read_attribute (enum dwarf_form form, struct dwarf_buf *buf, const unsigned char *dwarf_str, size_t dwarf_str_size, struct attr_val *val) { + /* Avoid warnings about val.u.FIELD may be used uninitialized if + this function is inlined. The warnings aren't valid but can + occur because the different fields are set and used + conditionally. */ + memset (val, 0, sizeof *val); + switch (form) { case DW_FORM_addr: |