summaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-07-05 09:04:51 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-07-05 09:05:05 -0700
commit1d827a720c9659cc8d54059ccc3efae24b875c03 (patch)
tree994f49f2ebf72794c24099a34aedcd84643f0983 /binutils/dwarf.c
parent15a7695fdce108548169ca265cc440b049d63951 (diff)
Fix build with GCC 4.2
Fix GCC 4.2 warnings like: cc1: warnings being treated as errors binutils-gdb/bfd/dwarf2.c:1844: warning: declaration of ‘time’ shadows a global declaration /usr/include/time.h:187: warning: shadowed declaration is here binutils-gdb/bfd/dwarf2.c: In function ‘line_info_add_file_name’: binutils-gdb/bfd/dwarf2.c:1854: warning: declaration of ‘time’ shadows a global declaration /usr/include/time.h:187: warning: shadowed declaration is here bfd/ * dwarf2.c (line_info_add_include_dir_stub): Replace time with xtime. (line_info_add_file_name): Likewise. (decode_line_info): Likewise. binutils/ * dwarf.c (display_debug_names): Replace index with xindex.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 70aa0111a6..5cada3704e 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -7887,13 +7887,14 @@ display_debug_names (struct dwarf_section *section, void *file)
abbrevptr += bytes_read;
for (;;)
{
- const dwarf_vma index = read_uleb128 (abbrevptr, &bytes_read,
- abbrev_table_end);
+ const dwarf_vma xindex = read_uleb128 (abbrevptr,
+ &bytes_read,
+ abbrev_table_end);
abbrevptr += bytes_read;
const dwarf_vma form = read_uleb128 (abbrevptr, &bytes_read,
abbrev_table_end);
abbrevptr += bytes_read;
- if (index == 0 && form == 0)
+ if (xindex == 0 && form == 0)
break;
}
}
@@ -7965,17 +7966,18 @@ display_debug_names (struct dwarf_section *section, void *file)
printf (" %s", get_TAG_name (dwarf_tag));
for (;;)
{
- const dwarf_vma index = read_uleb128 (abbrevptr, &bytes_read,
- abbrev_table_end);
+ const dwarf_vma xindex = read_uleb128 (abbrevptr,
+ &bytes_read,
+ abbrev_table_end);
abbrevptr += bytes_read;
const dwarf_vma form = read_uleb128 (abbrevptr, &bytes_read,
abbrev_table_end);
abbrevptr += bytes_read;
- if (index == 0 && form == 0)
+ if (xindex == 0 && form == 0)
break;
if (tagno >= 0)
- printf (" %s", get_IDX_name (index));
+ printf (" %s", get_IDX_name (xindex));
entryptr = read_and_display_attr_value (0, form, 0, entryptr,
unit_end, 0, 0,
offset_size,