* dwarf.c (read_attribute): Always clear val.

From-SVN: r193670
This commit is contained in:
Ian Lance Taylor 2012-11-20 17:28:05 +00:00 committed by Ian Lance Taylor
parent 03367cbbae
commit b20ade36e4
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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: