Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/vax Add a default: branch with a panic() to the...



details:   https://anonhg.NetBSD.org/src/rev/b3a9cddf3f97
branches:  trunk
changeset: 554973:b3a9cddf3f97
user:      he <he%NetBSD.org@localhost>
date:      Thu Nov 06 00:32:27 2003 +0000

description:
Add a default: branch with a panic() to the switch statement to
handle "impossible" segment types, so that the compiler can know
that 'pt' has been initialized after the switch statement.

diffstat:

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

diffs (27 lines):

diff -r bd1aed00e6ff -r b3a9cddf3f97 sys/arch/vax/vax/pmap.c
--- a/sys/arch/vax/vax/pmap.c   Thu Nov 06 00:30:13 2003 +0000
+++ b/sys/arch/vax/vax/pmap.c   Thu Nov 06 00:32:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.129 2003/10/19 14:58:22 ragge Exp $    */
+/*     $NetBSD: pmap.c,v 1.130 2003/11/06 00:32:27 he Exp $       */
 /*
  * Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.129 2003/10/19 14:58:22 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.130 2003/11/06 00:32:27 he Exp $");
 
 #include "opt_ddb.h"
 #include "opt_cputype.h"
@@ -1309,6 +1309,8 @@
                pt = pmap->pm_p0br;
                pr = (prot & VM_PROT_WRITE ? PROT_RW : PROT_RO);
                break;
+       default:
+               panic("unsupported segtype: %d", SEGTYPE(start));
        }
 
        pts = &pt[start >> VAX_PGSHIFT];



Home | Main Index | Thread Index | Old Index