summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-sysdeps-pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-sysdeps-pthread.c')
-rw-r--r--dbus/dbus-sysdeps-pthread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dbus/dbus-sysdeps-pthread.c b/dbus/dbus-sysdeps-pthread.c
index fc2acd40..2f33b1c4 100644
--- a/dbus/dbus-sysdeps-pthread.c
+++ b/dbus/dbus-sysdeps-pthread.c
@@ -50,8 +50,9 @@ typedef struct {
#ifdef DBUS_DISABLE_ASSERT
-#define PTHREAD_CHECK(func_name, result_or_call) do { \
- do { (result_or_call) } while (0)
+/* (tmp != 0) is a no-op usage to silence compiler */
+#define PTHREAD_CHECK(func_name, result_or_call) \
+ do { int tmp = (result_or_call); if (tmp != 0) {;} } while (0)
#else
#define PTHREAD_CHECK(func_name, result_or_call) do { \
int tmp = (result_or_call); \