public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] bfd/elf64-ppc.c: fix clang -Wbitwise-instead-of-logical warning in ppc64_elf_check_init_fini
Date: Mon, 17 Jan 2022 21:44:30 +1030	[thread overview]
Message-ID: <YeVPlvblO94sgMuL@squeak.grove.modra.org> (raw)
In-Reply-To: <6416247f-d88f-48db-4352-e04988ecfe94@efficios.com>

On Mon, Jan 17, 2022 at 05:50:46AM -0500, Simon Marchi wrote:
> 
> 
> On 2022-01-16 18:10, Alan Modra wrote:
> > On Sat, Jan 15, 2022 at 10:13:07PM -0500, Simon Marchi via Binutils wrote:
> >> --- a/bfd/elf64-ppc.c
> >> +++ b/bfd/elf64-ppc.c
> >> @@ -13129,7 +13129,7 @@ bool
> >>  ppc64_elf_check_init_fini (struct bfd_link_info *info)
> >>  {
> >>    return (check_pasted_section (info, ".init")
> >> -	  & check_pasted_section (info, ".fini"));
> >> +	  && check_pasted_section (info, ".fini"));
> >>  }
> >>  
> >>  /* See whether we can group stub sections together.  Grouping stub
> > 
> > I think I'd rather see this fixed by
> > 
> >   bool ret1 = check_pasted_section (info, ".init");
> >   bool ret2 = check_pasted_section (info, ".fini");
> >   return ret1 && ret1;
> > 
> > check_pasted_section has a side effect, and failure normally only
> > produces a warning.
> > 
> 
> No problem, here's the updated patch.

Thanks, please commit.

-- 
Alan Modra
Australia Development Lab, IBM

  reply	other threads:[~2022-01-17 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16  3:13 Simon Marchi
2022-01-16 23:10 ` Alan Modra
2022-01-17 10:50   ` Simon Marchi
2022-01-17 11:14     ` Alan Modra [this message]
2022-01-18  4:15       ` Simon Marchi

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=YeVPlvblO94sgMuL@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=simon.marchi@efficios.com \
    /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).