Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bradshaw <mjbshaw@google.com>2019-08-14 03:12:20 +0300
committerHenrik Gramner <gramner@twoorioles.com>2019-08-14 03:12:20 +0300
commitd20d70e83704f2c64855a2a605c0c39aaaf39e1a (patch)
treeb7c322890fd1dd21e176141437a892607fcac4c1
parent0f4edbff255cfa8aa5ee35242e393017b223ffdc (diff)
Prefer `do {} while (0);` over `while (0);`
-rw-r--r--src/thread.h4
-rw-r--r--tests/checkasm/checkasm.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/thread.h b/src/thread.h
index 1503c66..f3a35d1 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -130,7 +130,7 @@ static inline int pthread_cond_broadcast(pthread_cond_t *const cond) {
#include <pthread.h>
-#define dav1d_init_thread() while (0)
+#define dav1d_init_thread() do {} while (0)
/* Thread naming support */
@@ -169,7 +169,7 @@ static inline void dav1d_set_thread_name(const char *const name) {
#else
-#define dav1d_set_thread_name(name) while (0)
+#define dav1d_set_thread_name(name) do {} while (0)
#endif
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 9c38b79..3127926 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -279,7 +279,7 @@ void checkasm_stack_clobber(uint64_t clobber, ...);
}\
} while (0)
#else
-#define bench_new(...) while (0)
+#define bench_new(...) do {} while (0)
#endif
#define DECL_CHECKASM_CHECK_FUNC(type) \