Fix some warnings that creep up when compiling without INVARIANTS.
authorSascha Wildner <saw@online.de>
Wed, 16 Dec 2009 08:36:59 +0000 (09:36 +0100)
committerSascha Wildner <saw@online.de>
Wed, 16 Dec 2009 08:36:59 +0000 (09:36 +0100)
commitf64b567cf96e78e43e82bdb4309c004a9c30bb50
tree888ad591c0122cdefa7538ebfcede48c71c5ad1b
parent324ad9edd2f36e800850c76defbbe0d19de3b730
Fix some warnings that creep up when compiling without INVARIANTS.

* Add a __debugvar define to <sys/systm.h> which is empty when INVARIANTS
  is set (default) and __attribute__((unused)) when INVARIANTS is not set.

* Use __debugvar in the declaration of variables which are only used in a
  KASSERT or KKASSERT to avoid 'unused variable' warnings.

Suggested-by: aggelos
Reported-by: Joel K. Petterson <joelkpettersson@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1629>
sys/kern/kern_lock.c
sys/kern/kern_sig.c
sys/kern/lwkt_thread.c
sys/kern/vfs_cache.c
sys/kern/vfs_syscalls.c
sys/platform/pc32/i386/pmap.c
sys/sys/systm.h
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_subs.c
sys/vfs/nfs/nfs_vnops.c