From 2b63c337d99fe12220e6ca12a71dac6cdd3224d3 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 26 Nov 2017 10:12:35 -0800 Subject: [PATCH] Rename argument name from link to xlink MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixed the build with GCC 4.2: cc1: warnings being treated as errors binutils-gdb/binutils/dwarf.c: In function ‘load_separate_debug_info’: binutils-gdb/binutils/dwarf.c:9650: warning: declaration of ‘link’ shadows a global declaration /usr/include/unistd.h:757: warning: shadowed declaration is here * dwarf.c (load_separate_debug_info): Rename argument name from link to xlink. --- binutils/ChangeLog | 5 +++++ binutils/dwarf.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index eab683047e..75ef5cd032 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2017-11-26 H.J. Lu + + * dwarf.c (load_separate_debug_info): Rename argument name from + link to xlink. + 2017-11-24 H.J. Lu PR binutils/22444 diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 8b968797af..a92e7b1fc6 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -9647,7 +9647,7 @@ parse_gnu_debugaltlink (struct dwarf_section * section, void * data) static void * load_separate_debug_info (const char * main_filename, - struct dwarf_section * link, + struct dwarf_section * xlink, parse_func_type parse_func, check_func_type check_func, void * func_data) @@ -9658,10 +9658,10 @@ load_separate_debug_info (const char * main_filename, size_t canon_dirlen; size_t dirlen; - if ((separate_filename = parse_func (link, func_data)) == NULL) + if ((separate_filename = parse_func (xlink, func_data)) == NULL) { warn (_("Corrupt debuglink section: %s\n"), - link->name ? link->name : link->uncompressed_name); + xlink->name ? xlink->name : xlink->uncompressed_name); return FALSE; } -- 2.34.1