From: Gary Benson Date: Mon, 20 Apr 2020 14:05:01 +0000 (+0100) Subject: Fix compilation error with clang in gdb/testsuite/gdb.base/jit-main.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0c45f305525bbc3fd95024e4517a52d1c371868;p=binutils-gdb.git 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 --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 + + * gdb.base/jit-main.c: Fix compilation error with clang. + 2020-04-17 Kamil Rytarowski * 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;