Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [OB PATCH] Fix compilation error with clang in gdb/testsuite/gdb.trace/tspeed.c
Date: Mon, 20 Apr 2020 15:08:04 +0100	[thread overview]
Message-ID: <1587391684-8650-1-git-send-email-gbenson@redhat.com> (raw)

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



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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 14:08 Gary Benson [this message]
2020-04-20 14:11 ` Simon Marchi
2020-04-20 14:15   ` Gary Benson
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=1587391684-8650-1-git-send-email-gbenson@redhat.com \
    --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