+2004-08-14 Ken Raeburn <raeburn@mit.edu>
+
+ * k5-thread.h (k5_os_nothread_mutex_assert_locked,
+ k5_os_nothread_mutex_assert_unlocked, k5_os_mutex_assert_locked,
+ k5_os_mutex_assert_unlocked): Assertion macros should always have
+ type void.
+
2004-08-12 Ken Raeburn <raeburn@mit.edu>
* k5-thread.h (k5_os_nothread_mutex_finish_init,
# define k5_os_nothread_mutex_assert_locked(M) \
(assert((M)->initialized == K5_MUTEX_DEBUG_INITIALIZED), \
assert((M)->locked != K5_MUTEX_DEBUG_UNLOCKED), \
- assert((M)->locked == K5_MUTEX_DEBUG_LOCKED), 0)
+ assert((M)->locked == K5_MUTEX_DEBUG_LOCKED))
# define k5_os_nothread_mutex_assert_unlocked(M) \
(assert((M)->initialized == K5_MUTEX_DEBUG_INITIALIZED), \
assert((M)->locked != K5_MUTEX_DEBUG_LOCKED), \
- assert((M)->locked == K5_MUTEX_DEBUG_UNLOCKED), 0)
+ assert((M)->locked == K5_MUTEX_DEBUG_UNLOCKED))
#else /* threads disabled and not debugging */
static inline int k5_os_nothread_mutex_unlock(k5_os_nothread_mutex *m) {
return 0;
}
-# define k5_os_nothread_mutex_assert_locked(M) (0)
-# define k5_os_nothread_mutex_assert_unlocked(M) (0)
+# define k5_os_nothread_mutex_assert_locked(M) ((void)0)
+# define k5_os_nothread_mutex_assert_unlocked(M) ((void(0)
#endif
(M)->is_locked = 0, \
ReleaseMutex((M)->h) ? 0 : GetLastError())
-# define k5_os_mutex_assert_unlocked(M) (0)
-# define k5_os_mutex_assert_locked(M) (0)
+# define k5_os_mutex_assert_unlocked(M) ((void)0)
+# define k5_os_mutex_assert_locked(M) ((void)0)
#else