Commit b20ade36 by Ian Lance Taylor Committed by Ian Lance Taylor

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

From-SVN: r193670
parent 03367cbb
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
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment