Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/oea gcc 4.8.1 wants:
details: https://anonhg.NetBSD.org/src/rev/d7a25bf27f36
branches: trunk
changeset: 791078:d7a25bf27f36
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Nov 03 22:15:57 2013 +0000
description:
gcc 4.8.1 wants:
- remove some set but unused variables
- move some variables inside their usage #ifdef's
- cast to (void) instead of using a dummy return variable
(there are more to come, but this one is now tested with gcc 4.5)
diffstat:
sys/arch/powerpc/oea/pmap.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (87 lines):
diff -r 2ea5164ba220 -r d7a25bf27f36 sys/arch/powerpc/oea/pmap.c
--- a/sys/arch/powerpc/oea/pmap.c Sun Nov 03 18:37:10 2013 +0000
+++ b/sys/arch/powerpc/oea/pmap.c Sun Nov 03 22:15:57 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.89 2013/04/11 17:13:15 macallan Exp $ */
+/* $NetBSD: pmap.c,v 1.90 2013/11/03 22:15:57 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.89 2013/04/11 17:13:15 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.90 2013/11/03 22:15:57 mrg Exp $");
#define PMAP_NOOPNAMES
@@ -1896,7 +1896,6 @@
struct pool *pl;
register_t pte_lo;
int error;
- u_int pvo_flags;
u_int was_exec = 0;
PMAP_LOCK();
@@ -1904,13 +1903,11 @@
if (__predict_false(!pmap_initialized)) {
pvo_head = &pmap_pvo_kunmanaged;
pl = &pmap_upvo_pool;
- pvo_flags = 0;
pg = NULL;
was_exec = PTE_EXEC;
} else {
pvo_head = pa_to_pvoh(pa, &pg);
pl = &pmap_mpvo_pool;
- pvo_flags = PVO_MANAGED;
}
DPRINTFN(ENTER,
@@ -2647,7 +2644,9 @@
pmap_print_mmuregs(void)
{
int i;
+#if defined (PMAP_OEA) || defined (PMAP_OEA_BRIDGE)
u_int cpuvers;
+#endif
#ifndef PMAP_OEA64
vaddr_t addr;
register_t soft_sr[16];
@@ -2658,7 +2657,9 @@
#endif
paddr_t sdr1;
+#if defined (PMAP_OEA) || defined (PMAP_OEA_BRIDGE)
cpuvers = MFPVR() >> 16;
+#endif
__asm volatile ("mfsdr1 %0" : "=r"(sdr1));
#ifndef PMAP_OEA64
addr = 0;
@@ -3093,7 +3094,7 @@
vaddr_t va, va_end;
register_t pte_lo = 0x0;
- int ptegidx = 0, i = 0;
+ int ptegidx = 0;
struct pte pte;
va_list ap;
@@ -3107,7 +3108,7 @@
for (va = 0x0; va < SEGMENT_LENGTH; va += 0x1000) {
ptegidx = va_to_pteg(pmap_kernel(), va);
pmap_pte_create(&pte, pmap_kernel(), va, va | pte_lo);
- i = pmap_pte_insert(ptegidx, &pte);
+ (void)pmap_pte_insert(ptegidx, &pte);
}
va_start(ap, use_large_pages);
@@ -3129,7 +3130,7 @@
#endif
ptegidx = va_to_pteg(pmap_kernel(), va);
pmap_pte_create(&pte, pmap_kernel(), va, pa | pte_lo);
- i = pmap_pte_insert(ptegidx, &pte);
+ (void)pmap_pte_insert(ptegidx, &pte);
}
}
Home |
Main Index |
Thread Index |
Old Index