From fa93cc8f35dbed69c3c47aa803686d87f2143779 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Mon, 20 Apr 2020 15:05:01 +0100 Subject: [PATCH] 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 --- 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 0377114425..8ee15208ce 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-04-20 Gary Benson + + * gdb/testsuite/gdb.trace/tspeed.c: Fix compilation error with + clang. + 2020-04-20 Gary Benson * 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 b2c26bba44..39a6646b22 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) -- 2.34.1