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

View File

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

View File

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