Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/alpha Fix unused variable warning when DIAGNO...



details:   https://anonhg.NetBSD.org/src/rev/556b57a287f6
branches:  trunk
changeset: 983624:556b57a287f6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun May 30 19:46:21 2021 +0000

description:
Fix unused variable warning when DIAGNOSTIC is disabled.  Pointed out
by jklos.

diffstat:

 sys/arch/alpha/alpha/pmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 3a99bd4727ab -r 556b57a287f6 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c       Sun May 30 19:41:59 2021 +0000
+++ b/sys/arch/alpha/alpha/pmap.c       Sun May 30 19:46:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.290 2021/05/30 19:41:59 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.291 2021/05/30 19:46:21 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.290 2021/05/30 19:41:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.291 2021/05/30 19:46:21 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1657,7 +1657,6 @@
                return;
 
        pt_entry_t *lev1map = pmap_lev1map(pmap);
-       int i;
 
        rw_enter(&pmap_growkernel_lock, RW_READER);
 
@@ -1670,6 +1669,7 @@
 
        pool_cache_put(&pmap_l1pt_cache, lev1map);
 #ifdef DIAGNOSTIC
+       int i;
        for (i = 0; i < pmap_ncpuids; i++) {
                pmap->pm_percpu[i].pmc_lev1map = (pt_entry_t *)0xdeadbeefUL;
        }



Home | Main Index | Thread Index | Old Index