public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix compilation error with clang in gdb/testsuite/gdb.base/jit-main.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=e0c45f305525bbc3fd95024e4517a52d1c371868
commit e0c45f305525bbc3fd95024e4517a52d1c371868
Author: Gary Benson <gbenson@redhat.com>
Date: Mon Apr 20 15:05:01 2020 +0100
Fix compilation error with clang in gdb/testsuite/gdb.base/jit-main.c
Clang fails to compile the above file, with the following error:
warning: while loop has empty body [-Wempty-body]
This prevents the following testcases from executing:
gdb.base/jit.exp
gdb.base/jit-so.exp
Diff:
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.base/jit-main.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b24efc772b2..03771144256 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+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>
* gdb.base/attach-twice.c: Include "sys/types.h".
diff --git a/gdb/testsuite/gdb.base/jit-main.c b/gdb/testsuite/gdb.base/jit-main.c
index 40958ef5b54..37c2a31b3f2 100644
--- a/gdb/testsuite/gdb.base/jit-main.c
+++ b/gdb/testsuite/gdb.base/jit-main.c
@@ -128,7 +128,7 @@ update_locations (const void *const addr, int idx)
/* Used to spin waiting for GDB. */
volatile int wait_for_gdb = ATTACH;
-#define WAIT_FOR_GDB while (wait_for_gdb)
+#define WAIT_FOR_GDB do {} while (wait_for_gdb)
/* The current process's PID. GDB retrieves this. */
int mypid;
^ 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.base/jit-main.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).