diff options
author | adrian <adrian@FreeBSD.org> | 2013-01-02 18:21:24 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-01-02 18:21:24 +0000 |
commit | e2599129bc514805e53d83964c6a0414649607f7 (patch) | |
tree | fb12994a39cccd1da3ce283b87e5e66866a12199 | |
parent | b01e424a2bd1501219292d04b52b226bb086fff8 (diff) | |
download | FreeBSD-src-e2599129bc514805e53d83964c6a0414649607f7.zip FreeBSD-src-e2599129bc514805e53d83964c6a0414649607f7.tar.gz |
Fix up some warnings from clang.
This still triggers a bug in clang..
-rw-r--r-- | tools/tools/ath/athstats/athstats.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/tools/ath/athstats/athstats.c b/tools/tools/ath/athstats/athstats.c index c36dfa0..ef815bd 100644 --- a/tools/tools/ath/athstats/athstats.c +++ b/tools/tools/ath/athstats/athstats.c @@ -490,7 +490,7 @@ ath_zerostats(struct athstatfoo *wf0) struct athstatfoo_p *wf = (struct athstatfoo_p *) wf0; if (ioctl(wf->s, SIOCZATHSTATS, &wf->ifr) < 0) - err(-1, wf->ifr.ifr_name); + err(-1, "ioctl: %s", wf->ifr.ifr_name); } static void @@ -498,21 +498,21 @@ ath_collect(struct athstatfoo_p *wf, struct _athstats *stats) { wf->ifr.ifr_data = (caddr_t) &stats->ath; if (ioctl(wf->s, SIOCGATHSTATS, &wf->ifr) < 0) - err(1, wf->ifr.ifr_name); + err(1, "ioctl: %s", wf->ifr.ifr_name); #ifdef ATH_SUPPORT_ANI if (wf->optstats & ATHSTATS_ANI) { wf->atd.ad_id = 5; wf->atd.ad_out_data = (caddr_t) &stats->ani_state; wf->atd.ad_out_size = sizeof(stats->ani_state); if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) { - warn(wf->atd.ad_name); + warn("ioctl: %s", wf->atd.ad_name); wf->optstats &= ~ATHSTATS_ANI; } wf->atd.ad_id = 8; wf->atd.ad_out_data = (caddr_t) &stats->ani_stats; wf->atd.ad_out_size = sizeof(stats->ani_stats); if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) - warn(wf->atd.ad_name); + warn("ioctl: %s", wf->atd.ad_name); } #endif /* ATH_SUPPORT_ANI */ } @@ -574,12 +574,14 @@ ath_get_curstat(struct statfoo *sf, int s, char b[], size_t bs) switch (s) { case S_INPUT: snprintf(b, bs, "%lu", - (wf->cur.ath.ast_rx_packets - wf->total.ath.ast_rx_packets) - - (wf->cur.ath.ast_rx_mgt - wf->total.ath.ast_rx_mgt)); + (unsigned long) + ((wf->cur.ath.ast_rx_packets - wf->total.ath.ast_rx_packets) - + (wf->cur.ath.ast_rx_mgt - wf->total.ath.ast_rx_mgt))); return 1; case S_OUTPUT: snprintf(b, bs, "%lu", - wf->cur.ath.ast_tx_packets - wf->total.ath.ast_tx_packets); + (unsigned long) + (wf->cur.ath.ast_tx_packets - wf->total.ath.ast_tx_packets)); return 1; case S_RATE: snprintrate(b, bs, wf->cur.ath.ast_tx_rate); |