Module Name:    src
Committed By:   he
Date:           Sun Jan 29 20:16:17 UTC 2012

Modified Files:
        src/sys/arch/arm/arm32: pmap.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.227 -r1.228 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.227 src/sys/arch/arm/arm32/pmap.c:1.228
--- src/sys/arch/arm/arm32/pmap.c:1.227	Sat Jan 28 16:16:41 2012
+++ src/sys/arch/arm/arm32/pmap.c	Sun Jan 29 20:16:16 2012
@@ -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 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v
 		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);

Reply via email to