git: Fix some warnings that creep up when compiling without INVARIANTS.

Sascha Wildner swildner at crater.dragonflybsd.org
Wed Dec 16 00:41:17 PST 2009


commit f64b567cf96e78e43e82bdb4309c004a9c30bb50
Author: Sascha Wildner <saw at online.de>
Date:   Wed Dec 16 09:36:59 2009 +0100

    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 at gmail.com>
    Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1629>

Summary of changes:
 sys/kern/kern_lock.c           |    4 ++--
 sys/kern/kern_sig.c            |    2 +-
 sys/kern/lwkt_thread.c         |    9 ++++++---
 sys/kern/vfs_cache.c           |    2 +-
 sys/kern/vfs_syscalls.c        |    4 ++--
 sys/platform/pc32/i386/pmap.c  |    2 +-
 sys/sys/systm.h                |    2 ++
 sys/vfs/hammer/hammer_object.c |    2 +-
 sys/vfs/hammer/hammer_subs.c   |    4 ++--
 sys/vfs/nfs/nfs_vnops.c        |    2 +-
 10 files changed, 19 insertions(+), 14 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f64b567cf96e78e43e82bdb4309c004a9c30bb50


-- 
DragonFly BSD source repository





More information about the Commits mailing list