From 35e3b6dd862e5661ad5e50939e1f9c376e4c32d9 Mon Sep 17 00:00:00 2001 From: ragge Date: Sat, 20 Jun 1998 21:01:43 +0000 Subject: [PATCH] Fix some compile-time warnings. Pointed out by David Brownlee. --- sys/arch/vax/if/if_qe.c | 7 ++++--- sys/arch/vax/vax/locore.c | 21 ++++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c index 5b4a0c612dd4..d8ebff6cfed4 100644 --- a/sys/arch/vax/if/if_qe.c +++ b/sys/arch/vax/if/if_qe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_qe.c,v 1.25 1998/03/13 11:40:19 ragge Exp $ */ +/* $NetBSD: if_qe.c,v 1.26 1998/06/20 21:01:43 ragge Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -749,9 +749,11 @@ qerint(unit) sc->rindex = (sc->rindex + 1) % NRCV; nrcv++; } +#ifndef QE_NO_OVERRUN_WARNINGS if (nrcv && nrcv < NRCV) log(LOG_ERR, "qe%d: ring overrun, resync'd by skipping %d\n", unit, nrcv); +#endif for (; sc->rring[sc->rindex].qe_status1 != QE_NOTYET; sc->rindex = ++sc->rindex % NRCV) { @@ -995,7 +997,6 @@ qeread(sc, ifrw, len) struct ifrw *ifrw; int len; { - struct ifnet *ifp = (struct ifnet *)&sc->qe_if; struct ether_header *eh; struct mbuf *m; @@ -1048,7 +1049,7 @@ if (m) { * there are no BPF listeners. And if we are in promiscuous * mode, we have to check if this packet is really ours. */ - if ((ifp->if_flags & IFF_PROMISC) && + if ((sc->qe_if.if_flags & IFF_PROMISC) && (eh->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */ bcmp(eh->ether_dhost, LLADDR(sc->qe_if.if_sadl), sizeof(eh->ether_dhost)) != 0) { diff --git a/sys/arch/vax/vax/locore.c b/sys/arch/vax/vax/locore.c index c9ecd1f979fd..8ff5abbf5f79 100644 --- a/sys/arch/vax/vax/locore.c +++ b/sys/arch/vax/vax/locore.c @@ -1,4 +1,4 @@ -/* $NetBSD: locore.c,v 1.27 1998/06/08 18:42:40 ragge Exp $ */ +/* $NetBSD: locore.c,v 1.28 1998/06/20 21:01:43 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -93,7 +93,6 @@ start() { extern char cpu_model[]; extern void *scratch; - int tmpptr; mtpr(AST_NO, PR_ASTLVL); /* Turn off ASTs */ @@ -190,15 +189,23 @@ start() vax_bustype = VAX_UNIBUS | VAX_CPUBUS; dep_call = &ka650_calls; strcpy(cpu_model,"MicroVAX "); - tmpptr = (vax_siedata >> 8) & 255; - if (tmpptr == VAX_SIE_KA640) + switch ((vax_siedata >> 8) & 255) { + case VAX_SIE_KA640: strcat(cpu_model, "3300/3400"); - else if (tmpptr == VAX_SIE_KA650) + break; + + case VAX_SIE_KA650: strcat(cpu_model, "3500/3600"); - else if (tmpptr == VAX_SIE_KA655) + break; + + case VAX_SIE_KA655: strcat(cpu_model, "3800/3900"); - else + break; + + default: strcat(cpu_model, "III"); + break; + } break; #endif default: