cast the return value of several macros that evaluate to "(func() == FOO)"

to (void) to avoid "computed value not used" warnings.
This commit is contained in:
mrg 2006-05-11 22:26:54 +00:00
parent ae844d5313
commit b18db50b21
2 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ath.c,v 1.71 2006/04/14 20:20:33 christos Exp $ */
/* $NetBSD: ath.c,v 1.72 2006/05/11 22:26:54 mrg Exp $ */
/*-
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@ -41,7 +41,7 @@
__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.71 2006/04/14 20:20:33 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.72 2006/05/11 22:26:54 mrg Exp $");
#endif
/*
@ -4683,7 +4683,7 @@ ath_getchannels(struct ath_softc *sc, u_int cc,
cc, HAL_MODE_ALL, outdoor, xchanmode)) {
u_int32_t rd;
ath_hal_getregdomain(ah, &rd);
(void)ath_hal_getregdomain(ah, &rd);
if_printf(ifp, "unable to collect channel list from hal; "
"regdomain likely %u country code %u\n", rd, cc);
free(chans, M_TEMP);
@ -4802,13 +4802,13 @@ ath_update_txpow(struct ath_softc *sc)
if (sc->sc_curtxpow != ic->ic_txpowlimit) {
ath_hal_settxpowlimit(ah, ic->ic_txpowlimit);
/* read back in case value is clamped */
ath_hal_gettxpowlimit(ah, &txpow);
(void)ath_hal_gettxpowlimit(ah, &txpow);
ic->ic_txpowlimit = sc->sc_curtxpow = txpow;
}
/*
* Fetch max tx power level for status requests.
*/
ath_hal_getmaxtxpow(sc->sc_ah, &txpow);
(void)ath_hal_getmaxtxpow(sc->sc_ah, &txpow);
ic->ic_bss->ni_txpower = txpow;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ath_netbsd.c,v 1.7 2006/03/02 03:38:45 dyoung Exp $ */
/* $NetBSD: ath_netbsd.c,v 1.8 2006/05/11 22:26:54 mrg Exp $ */
/*-
* Copyright (c) 2003, 2004 David Young
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ath_netbsd.c,v 1.7 2006/03/02 03:38:45 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: ath_netbsd.c,v 1.8 2006/05/11 22:26:54 mrg Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -294,7 +294,7 @@ ath_sysctl_tpscale(SYSCTLFN_ARGS)
node = *rnode;
sc = (struct ath_softc *)node.sysctl_data;
ath_hal_gettpscale(sc->sc_ah, &scale);
(void)ath_hal_gettpscale(sc->sc_ah, &scale);
node.sysctl_data = &scale;
error = sysctl_lookup(SYSCTLFN_CALL(&node));
if (error || newp == NULL)
@ -350,7 +350,7 @@ ath_sysctl_rfsilent(SYSCTLFN_ARGS)
node = *rnode;
sc = (struct ath_softc *)node.sysctl_data;
ath_hal_getrfsilent(sc->sc_ah, &rfsilent);
(void)ath_hal_getrfsilent(sc->sc_ah, &rfsilent);
node.sysctl_data = &rfsilent;
error = sysctl_lookup(SYSCTLFN_CALL(&node));
if (error || newp == NULL)
@ -387,7 +387,7 @@ ath_sysctl_tpack(SYSCTLFN_ARGS)
node = *rnode;
sc = (struct ath_softc *)node.sysctl_data;
ath_hal_gettpack(sc->sc_ah, &tpack);
(void)ath_hal_gettpack(sc->sc_ah, &tpack);
node.sysctl_data = &tpack;
error = sysctl_lookup(SYSCTLFN_CALL(&node));
if (error || newp == NULL)
@ -405,7 +405,7 @@ ath_sysctl_tpcts(SYSCTLFN_ARGS)
node = *rnode;
sc = (struct ath_softc *)node.sysctl_data;
ath_hal_gettpcts(sc->sc_ah, &tpcts);
(void)ath_hal_gettpcts(sc->sc_ah, &tpcts);
node.sysctl_data = &tpcts;
error = sysctl_lookup(SYSCTLFN_CALL(&node));
if (error || newp == NULL)
@ -467,7 +467,7 @@ ath_sysctlattach(struct ath_softc *sc)
const struct sysctlnode *cnode, *rnode;
ath_hal_getcountrycode(sc->sc_ah, &sc->sc_countrycode);
ath_hal_getregdomain(sc->sc_ah, &sc->sc_regdomain);
(void)ath_hal_getregdomain(sc->sc_ah, &sc->sc_regdomain);
sc->sc_debug = ath_debug;
sc->sc_txintrperiod = ATH_TXINTR_PERIOD;