From 05721f8fb43b9960a94146675ab65b9cdf3d9d4c Mon Sep 17 00:00:00 2001 From: he Date: Thu, 2 Jun 2005 14:41:26 +0000 Subject: [PATCH] Adapt to -Wcast-qual by adding a const and using __UNVOLATILE() in a couple of places where memcpy() is used. --- sys/dev/ic/i82596.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c index f358a6dd68a8..51ab6a0a097a 100644 --- a/sys/dev/ic/i82596.c +++ b/sys/dev/ic/i82596.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82596.c,v 1.8 2005/02/27 00:27:01 perry Exp $ */ +/* $NetBSD: i82596.c,v 1.9 2005/06/02 14:41:26 he Exp $ */ /* * Copyright (c) 2003 Jochen Kunz. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.8 2005/02/27 00:27:01 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.9 2005/06/02 14:41:26 he Exp $"); /* autoconfig and device stuff */ #include @@ -80,7 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.8 2005/02/27 00:27:01 perry Exp $"); /* Supported chip variants */ -char *i82596_typenames[] = { "unknowen", "DX/SX", "CA" }; +const char *i82596_typenames[] = { "unknowen", "DX/SX", "CA" }; @@ -421,11 +421,11 @@ iee_cb_setup(struct iee_softc *sc, uint32_t cmd) case IEE_CB_CMD_NOP: /* NOP CMD */ break; case IEE_CB_CMD_IAS: /* Individual Address Setup */ - memcpy((void*)cb->cb_ind_addr, LLADDR(ifp->if_sadl), + memcpy(__UNVOLATILE(cb->cb_ind_addr), LLADDR(ifp->if_sadl), ETHER_ADDR_LEN); break; case IEE_CB_CMD_CONF: /* Configure */ - memcpy((void*)cb->cb_cf, sc->sc_cf, sc->sc_cf[0] + memcpy(__UNVOLATILE(cb->cb_cf), sc->sc_cf, sc->sc_cf[0] & IEE_CF_0_CNT_M); break; case IEE_CB_CMD_MCS: /* Multicast Setup */ @@ -453,8 +453,8 @@ iee_cb_setup(struct iee_softc *sc, uint32_t cmd) cb->cb_mcast.mc_size = 0; break; } - memcpy((void*) &cb->cb_mcast.mc_addrs[ - cb->cb_mcast.mc_size * ETHER_ADDR_LEN], + memcpy(__UNVOLATILE(&cb->cb_mcast.mc_addrs[ + cb->cb_mcast.mc_size * ETHER_ADDR_LEN]), enm->enm_addrlo, ETHER_ADDR_LEN); ETHER_NEXT_MULTI(step, enm); cb->cb_mcast.mc_size++;