Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 Only declare helper variable which is onl...



details:   https://anonhg.NetBSD.org/src/rev/e736721c5cdb
branches:  trunk
changeset: 773252:e736721c5cdb
user:      he <he%NetBSD.org@localhost>
date:      Sun Jan 29 20:16:16 2012 +0000

description:
Only declare helper variable which is only used in KASSERT() if
DIAGNOSTIC is defined, to avoid "variable defined but never used"
warning if DIAGNOSTIC isn't defined, and KASSERT() expands to
nothing.

diffstat:

 sys/arch/arm/arm32/pmap.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 99714847b290 -r e736721c5cdb sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Sun Jan 29 19:36:14 2012 +0000
+++ b/sys/arch/arm/arm32/pmap.c Sun Jan 29 20:16:16 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.227 2012/01/28 16:16:41 matt Exp $  */
+/*     $NetBSD: pmap.c,v 1.228 2012/01/29 20:16:16 he Exp $    */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -211,7 +211,7 @@
 #include <machine/param.h>
 #include <arm/arm32/katelib.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.227 2012/01/28 16:16:41 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.228 2012/01/29 20:16:16 he Exp $");
 
 #ifdef PMAP_DEBUG
 
@@ -3342,7 +3342,9 @@
                PMAPCOUNT(kenter_remappings);
 #ifdef PMAP_CACHE_VIPT
                opg = PHYS_TO_VM_PAGE(l2pte_pa(opte));
+#ifdef DIAGNOSTIC
                struct vm_page_md *omd = VM_PAGE_TO_MD(opg);
+#endif
                if (opg) {
                        KASSERT(opg != pg);
                        KASSERT((omd->pvh_attrs & PVF_KMPAGE) == 0);



Home | Main Index | Thread Index | Old Index