diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-06-21 09:01:12 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-06-21 09:01:12 +0000 |
commit | b541bd5a39b43c11067cf9193020c5fa63df0e65 (patch) | |
tree | 04572ff6acc27b683f08d6ed71bcd534579198ed /sys/sys/mutex.h | |
parent | cc5ff80770d96ca4ca6b86009674a097e1f1fc55 (diff) | |
download | FreeBSD-src-b541bd5a39b43c11067cf9193020c5fa63df0e65.zip FreeBSD-src-b541bd5a39b43c11067cf9193020c5fa63df0e65.tar.gz |
In non-debugging mode make this define (void)0 instead of nothing. This
helps to catch bugs like the below with clang.
if (cond); <--- note the trailing ;
something();
Approved by: ed (mentor)
Discussed on: current@
Diffstat (limited to 'sys/sys/mutex.h')
-rw-r--r-- | sys/sys/mutex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index 40795fc..929bf43 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -438,7 +438,7 @@ struct mtx_args { #define GIANT_REQUIRED mtx_assert(&Giant, MA_OWNED) #else /* INVARIANTS */ -#define mtx_assert(m, what) +#define mtx_assert(m, what) (void)0 #define GIANT_REQUIRED #endif /* INVARIANTS */ |