public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix compilation error with clang in gdb/testsuite/gdb.trace/tspeed.c
@ 2020-04-20 14:06 Gary Benson
0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2020-04-20 14:06 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fa93cc8f35dbed69c3c47aa803686d87f2143779
commit fa93cc8f35dbed69c3c47aa803686d87f2143779
Author: Gary Benson <gbenson@redhat.com>
Date: Mon Apr 20 15:05:01 2020 +0100
Fix compilation error with clang in gdb/testsuite/gdb.trace/tspeed.c
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
Diff:
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.trace/tspeed.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 03771144256..8ee15208cea 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-20 Gary Benson <gbenson@redhat.com>
+
+ * gdb/testsuite/gdb.trace/tspeed.c: Fix compilation error with
+ clang.
+
2020-04-20 Gary Benson <gbenson@redhat.com>
* gdb.base/jit-main.c: Fix compilation error with clang.
diff --git a/gdb/testsuite/gdb.trace/tspeed.c b/gdb/testsuite/gdb.trace/tspeed.c
index b2c26bba44d..39a6646b223 100644
--- a/gdb/testsuite/gdb.trace/tspeed.c
+++ b/gdb/testsuite/gdb.trace/tspeed.c
@@ -75,7 +75,7 @@ main(int argc, char **argv)
/* 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-20 14:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 14:06 [binutils-gdb] Fix compilation error with clang in gdb/testsuite/gdb.trace/tspeed.c Gary Benson
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).