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
This commit is contained in:
Gary Benson 2020-04-20 15:05:01 +01:00
parent e0c45f3055
commit fa93cc8f35
2 changed files with 6 additions and 1 deletions

View file

@ -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.

View file

@ -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)