From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Subject: [PATCH] objcopy: avoid "shadowing" of remove() function name
Date: Fri, 30 Sep 2022 10:54:18 +0200 [thread overview]
Message-ID: <76fa0c3c-2303-ebdf-a765-ac4731581517@suse.com> (raw)
remove() is a standard library function (declared in stdio.h), which
triggers a "shadows a global declaration" warning with some gcc versions.
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -4091,7 +4091,7 @@ setup_section (bfd *ibfd, sec_ptr isecti
&& (flags & (SEC_ALLOC | SEC_GROUP)) != 0
&& !is_nondebug_keep_contents_section (ibfd, isection))
{
- flagword remove = SEC_HAS_CONTENTS | SEC_LOAD | SEC_GROUP;
+ flagword clr = SEC_HAS_CONTENTS | SEC_LOAD | SEC_GROUP;
if (bfd_get_flavour (obfd) == bfd_target_elf_flavour)
{
@@ -4100,7 +4100,7 @@ setup_section (bfd *ibfd, sec_ptr isecti
being used with GDB, if they were based upon files that
originally contained groups. */
if (flags & SEC_GROUP)
- remove = SEC_LOAD;
+ clr = SEC_LOAD;
else
make_nobits = true;
@@ -4108,9 +4108,9 @@ setup_section (bfd *ibfd, sec_ptr isecti
elf.c:copy_private_bfd_data that section flags have not
changed between input and output sections. This hack
prevents wholesale rewriting of the program headers. */
- isection->flags &= ~remove;
+ isection->flags &= ~clr;
}
- flags &= ~remove;
+ flags &= ~clr;
}
osection = bfd_make_section_anyway_with_flags (obfd, name, flags);
reply other threads:[~2022-09-30 8:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76fa0c3c-2303-ebdf-a765-ac4731581517@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).