[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/12] thread.h: Remove trailing semicolons from Coverity qemu_mut
From: |
Peter Maydell |
Subject: |
[PULL 03/12] thread.h: Remove trailing semicolons from Coverity qemu_mutex_lock() etc |
Date: |
Tue, 14 Apr 2020 17:26:04 +0100 |
All the Coverity-specific definitions of qemu_mutex_lock() and friends
have a trailing semicolon. This works fine almost everywhere because
of QEMU's mandatory-braces coding style and because most callsites are
simple, but target/s390x/sigp.c has a use of qemu_mutex_trylock() as
an if() statement, which makes the ';' a syntax error:
"../target/s390x/sigp.c", line 461: warning #18: expected a ")"
if (qemu_mutex_trylock(&qemu_sigp_mutex)) {
^
Remove the bogus semicolons from the macro definitions.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
---
include/qemu/thread.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/qemu/thread.h b/include/qemu/thread.h
index 10262c63f58..d22848138ea 100644
--- a/include/qemu/thread.h
+++ b/include/qemu/thread.h
@@ -57,17 +57,17 @@ extern QemuCondTimedWaitFunc qemu_cond_timedwait_func;
* hide them.
*/
#define qemu_mutex_lock(m) \
- qemu_mutex_lock_impl(m, __FILE__, __LINE__);
+ qemu_mutex_lock_impl(m, __FILE__, __LINE__)
#define qemu_mutex_trylock(m) \
- qemu_mutex_trylock_impl(m, __FILE__, __LINE__);
+ qemu_mutex_trylock_impl(m, __FILE__, __LINE__)
#define qemu_rec_mutex_lock(m) \
- qemu_rec_mutex_lock_impl(m, __FILE__, __LINE__);
+ qemu_rec_mutex_lock_impl(m, __FILE__, __LINE__)
#define qemu_rec_mutex_trylock(m) \
- qemu_rec_mutex_trylock_impl(m, __FILE__, __LINE__);
+ qemu_rec_mutex_trylock_impl(m, __FILE__, __LINE__)
#define qemu_cond_wait(c, m) \
- qemu_cond_wait_impl(c, m, __FILE__, __LINE__);
+ qemu_cond_wait_impl(c, m, __FILE__, __LINE__)
#define qemu_cond_timedwait(c, m, ms) \
- qemu_cond_timedwait_impl(c, m, ms, __FILE__, __LINE__);
+ qemu_cond_timedwait_impl(c, m, ms, __FILE__, __LINE__)
#else
#define qemu_mutex_lock(m) ({ \
QemuMutexLockFunc _f = atomic_read(&qemu_mutex_lock_func); \
--
2.20.1
- [PULL 00/12] target-arm queue, Peter Maydell, 2020/04/14
- [PULL 01/12] osdep.h: Drop no-longer-needed Coverity workarounds, Peter Maydell, 2020/04/14
- [PULL 02/12] thread.h: Fix Coverity version of qemu_cond_timedwait(), Peter Maydell, 2020/04/14
- [PULL 03/12] thread.h: Remove trailing semicolons from Coverity qemu_mutex_lock() etc,
Peter Maydell <=
- [PULL 04/12] linux-user/flatload.c: Use "" for include of QEMU header target_flat.h, Peter Maydell, 2020/04/14
- [PULL 10/12] kernel-doc: Use c:struct for Sphinx 3.0 and later, Peter Maydell, 2020/04/14
- [PULL 06/12] scripts/coverity-scan: Add Docker support, Peter Maydell, 2020/04/14
- [PULL 07/12] docs: Improve our gdbstub documentation, Peter Maydell, 2020/04/14
- [PULL 05/12] scripts/run-coverity-scan: Script to run Coverity Scan build, Peter Maydell, 2020/04/14
- [PULL 11/12] docs: Require Sphinx 1.6 or better, Peter Maydell, 2020/04/14
- [PULL 12/12] Deprecate KVM support for AArch32, Peter Maydell, 2020/04/14
- [PULL 08/12] configure: Honour --disable-werror for Sphinx, Peter Maydell, 2020/04/14
- [PULL 09/12] scripts/kernel-doc: Add missing close-paren in c:function directives, Peter Maydell, 2020/04/14
- Re: [PULL 00/12] target-arm queue, Peter Maydell, 2020/04/14