Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/x68k mem_exists(): pacify one apparently bogus...



details:   https://anonhg.NetBSD.org/src/rev/68fb947bfef5
branches:  trunk
changeset: 554728:68fb947bfef5
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Nov 01 12:18:55 2003 +0000

description:
mem_exists(): pacify one apparently bogus -Wuninitialized warning

setmemrange(): add default case for cputype (same as CPU_68030), to fix
a potential uninitialized use

diffstat:

 sys/arch/x68k/x68k/machdep.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 89625ea2832f -r 68fb947bfef5 sys/arch/x68k/x68k/machdep.c
--- a/sys/arch/x68k/x68k/machdep.c      Sat Nov 01 11:50:53 2003 +0000
+++ b/sys/arch/x68k/x68k/machdep.c      Sat Nov 01 12:18:55 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.121 2003/11/01 11:50:53 jdolecek Exp $   */
+/*     $NetBSD: machdep.c,v 1.122 2003/11/01 12:18:55 jdolecek Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.121 2003/11/01 11:50:53 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.122 2003/11/01 12:18:55 jdolecek Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1163,7 +1163,7 @@
 {
        /* most variables must be register! */
        volatile unsigned char *m, *b;
-       unsigned char save_m, save_b;
+       unsigned char save_m, save_b=0; /* XXX: shutup gcc */
        int baseismem;
        int exists = 0;
        caddr_t base;
@@ -1287,6 +1287,7 @@
                int cacr;
                PCIA();         /* cpusha dc */
                switch (cputype) {
+               default:
                case CPU_68030:
                        cacr = CACHE_OFF;
                        break;
@@ -1331,6 +1332,7 @@
                int cacr;
                ICIA();
                switch (cputype) {
+               default:
                case CPU_68030:
                        cacr = CACHE_ON;
                        break;



Home | Main Index | Thread Index | Old Index