Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [OB PATCH] Fix compilation error with clang in gdb/testsuite/gdb.trace/tspeed.c
Date: Mon, 20 Apr 2020 15:15:32 +0100	[thread overview]
Message-ID: <20200420141531.GA9053@blade.nx> (raw)
In-Reply-To: <c446d2b0-c185-5a3a-8480-613b7d302d42@simark.ca>

Simon Marchi wrote:
> On 2020-04-20 10:08 a.m., Gary Benson via Gdb-patches wrote:
> > Clang fails to compile the above file, with the following error:
> >   warning: using the result of an assignment as a condition without
> >   parentheses [-Wparentheses]
> > 
> > This prevents the following testcase from executing:
> >   gdb.trace/tspeed.exp
> > ---
> >  gdb/testsuite/ChangeLog          | 5 +++++
> >  gdb/testsuite/gdb.trace/tspeed.c | 2 +-
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/gdb/testsuite/gdb.trace/tspeed.c b/gdb/testsuite/gdb.trace/tspeed.c
> > index b2c26bb..39a6646 100644
> > --- a/gdb/testsuite/gdb.trace/tspeed.c
> > +++ b/gdb/testsuite/gdb.trace/tspeed.c
> > @@ -75,7 +75,7 @@
> >  
> >        /* Keep trying the speed test, with more iterations, until
> >  	 we get to a reasonable number.  */
> > -      while (problem = trace_speed_test())
> > +      while ((problem = trace_speed_test()))
> >  	{
> >  	  /* If iteration isn't working, give up.  */
> >  	  if (iters > max_iters)
> > -- 
> > 1.8.3.1
> 
> For some reason, we don't see you ChangeLog entry in the patch
> (although the diffstat shows changes to it), but it looks like:
> 
> +2020-04-20  Gary Benson <gbenson@redhat.com>
> +
> +       * gdb/testsuite/gdb.trace/tspeed.c: Fix compilation error with
> +       clang.
> 
> The filename should not have the gdb/testsuite part.

It's not my day today!  Should I commit a fix to the ChangeLog, or
should I leave it alone?

Thanks,
Gary



  reply	other threads:[~2020-04-20 14:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 14:08 Gary Benson
2020-04-20 14:11 ` Simon Marchi
2020-04-20 14:15   ` Gary Benson [this message]
2020-04-20 14:16     ` Simon Marchi
2020-04-20 16:05       ` Gary Benson

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=20200420141531.GA9053@blade.nx \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@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