diff options
author | Gary Benson <gbenson@redhat.com> | 2020-04-20 15:05:01 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2020-04-20 15:06:13 +0100 |
commit | fa93cc8f35dbed69c3c47aa803686d87f2143779 (patch) | |
tree | 7baf18feabfb93979559418c68752b6bd17e9419 | |
parent | e0c45f305525bbc3fd95024e4517a52d1c371868 (diff) | |
download | gdb-fa93cc8f35dbed69c3c47aa803686d87f2143779.zip gdb-fa93cc8f35dbed69c3c47aa803686d87f2143779.tar.gz gdb-fa93cc8f35dbed69c3c47aa803686d87f2143779.tar.bz2 |
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
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.trace/tspeed.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0377114..8ee1520 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 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. 2020-04-17 Kamil Rytarowski <n54@gmx.com> 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 @@ 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) |