Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys use __USE() where appropriate.



details:   https://anonhg.NetBSD.org/src/rev/f216eb41df1a
branches:  trunk
changeset: 790726:f216eb41df1a
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Oct 19 21:01:39 2013 +0000

description:
use __USE() where appropriate.

diffstat:

 sys/dev/wscons/wsemul_vt100.c |  8 +++++---
 sys/kern/kern_acct.c          |  8 ++++++--
 sys/kern/kern_mutex.c         |  7 +++++--
 sys/kern/kern_rwlock.c        |  8 ++++++--
 4 files changed, 22 insertions(+), 9 deletions(-)

diffs (122 lines):

diff -r 28de57754da0 -r f216eb41df1a sys/dev/wscons/wsemul_vt100.c
--- a/sys/dev/wscons/wsemul_vt100.c     Sat Oct 19 21:00:32 2013 +0000
+++ b/sys/dev/wscons/wsemul_vt100.c     Sat Oct 19 21:01:39 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100.c,v 1.35 2010/02/11 10:07:14 drochner Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.36 2013/10/19 21:01:39 mrg Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.35 2010/02/11 10:07:14 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.36 2013/10/19 21:01:39 mrg Exp $");
 
 #include "opt_wsmsgattrs.h"
 
@@ -1037,7 +1037,9 @@
                                           vd->msgattrs.default_bg,
                                           vd->msgattrs.default_attrs,
                                           &tmp);
-#ifdef VT100_DEBUG
+#ifndef VT100_DEBUG
+       __USE(error);
+#else
        if (error)
                printf("vt100: failed to allocate attribute for default "
                       "messages\n");
diff -r 28de57754da0 -r f216eb41df1a sys/kern/kern_acct.c
--- a/sys/kern/kern_acct.c      Sat Oct 19 21:00:32 2013 +0000
+++ b/sys/kern/kern_acct.c      Sat Oct 19 21:01:39 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_acct.c,v 1.93 2011/09/03 14:09:03 christos Exp $  */
+/*     $NetBSD: kern_acct.c,v 1.94 2013/10/19 21:01:39 mrg Exp $       */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_acct.c,v 1.93 2011/09/03 14:09:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_acct.c,v 1.94 2013/10/19 21:01:39 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -224,6 +224,8 @@
                if (error != 0)
                        printf("acct_stop: failed to close, errno = %d\n",
                            error);
+#else
+               __USE(error);
 #endif
                acct_vp = NULLVP;
        }
@@ -259,6 +261,8 @@
                if (error != 0)
                        printf("acctwatch: failed to statvfs, error = %d\n",
                            error);
+#else
+               __USE(error);
 #endif
                rw_exit(&acct_lock);
                error = kpause("actwat", false, acctchkfreq * hz, NULL);
diff -r 28de57754da0 -r f216eb41df1a sys/kern/kern_mutex.c
--- a/sys/kern/kern_mutex.c     Sat Oct 19 21:00:32 2013 +0000
+++ b/sys/kern/kern_mutex.c     Sat Oct 19 21:01:39 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_mutex.c,v 1.57 2013/09/22 14:59:07 joerg Exp $    */
+/*     $NetBSD: kern_mutex.c,v 1.58 2013/10/19 21:01:39 mrg Exp $      */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 #define        __MUTEX_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.57 2013/09/22 14:59:07 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.58 2013/10/19 21:01:39 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -711,6 +711,9 @@
        MUTEX_DASSERT(mtx, curthread != 0);
        MUTEX_ASSERT(mtx, MUTEX_OWNER(mtx->mtx_owner) == curthread);
        MUTEX_UNLOCKED(mtx);
+#if !defined(LOCKDEBUG)
+       __USE(curthread);
+#endif
 
 #ifdef LOCKDEBUG
        /*
diff -r 28de57754da0 -r f216eb41df1a sys/kern/kern_rwlock.c
--- a/sys/kern/kern_rwlock.c    Sat Oct 19 21:00:32 2013 +0000
+++ b/sys/kern/kern_rwlock.c    Sat Oct 19 21:01:39 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_rwlock.c,v 1.41 2013/09/04 10:16:16 skrll Exp $   */
+/*     $NetBSD: kern_rwlock.c,v 1.42 2013/10/19 21:01:39 mrg Exp $     */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.41 2013/09/04 10:16:16 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.42 2013/10/19 21:01:39 mrg Exp $");
 
 #define        __RWLOCK_PRIVATE
 
@@ -580,6 +580,10 @@
        RW_DASSERT(rw, (rw->rw_owner & RW_WRITE_LOCKED) != 0);
        RW_ASSERT(rw, RW_OWNER(rw) == curthread);
        RW_UNLOCKED(rw, RW_WRITER);
+#if !defined(DIAGNOSTIC)
+       __USE(curthread);
+#endif
+
 
        membar_producer();
        owner = rw->rw_owner;



Home | Main Index | Thread Index | Old Index