aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2020-12-29 01:03:11 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2020-12-29 18:24:30 +0000
commitff7c2c5a3bc3321ea7eeab824eff25257e7fbaae (patch)
tree7669be79ef7df91806b3d472be42ea072d4f7f48 /tools
parentee938b20335d26ca652deac4a1a063e90cafa303 (diff)
downloadsrc-ff7c2c5a3bc3321ea7eeab824eff25257e7fbaae.tar.gz
src-ff7c2c5a3bc3321ea7eeab824eff25257e7fbaae.zip
[wlanstats] Fix warnings-as-errors on gcc-6.4 on mips
* use CLLADDR() to not try deconsting a const * Unsigned where they should be * static where it should be Tested: * freebsd/mips32, using gcc-6.4
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/net80211/wlanstats/main.c8
-rw-r--r--tools/tools/net80211/wlanstats/wlanstats.c10
2 files changed, 10 insertions, 8 deletions
diff --git a/tools/tools/net80211/wlanstats/main.c b/tools/tools/net80211/wlanstats/main.c
index bd73053be976..36da5c6b8e51 100644
--- a/tools/tools/net80211/wlanstats/main.c
+++ b/tools/tools/net80211/wlanstats/main.c
@@ -70,7 +70,7 @@ static struct {
static const char *
getfmt(const char *tag)
{
- int i;
+ unsigned int i;
for (i = 0; i < nitems(tags); i++)
if (strcasecmp(tags[i].tag, tag) == 0)
return tags[i].fmt;
@@ -156,8 +156,10 @@ print_sta_stats(FILE *fd, const u_int8_t macaddr[IEEE80211_ADDR_LEN])
}
#endif
-void
-usage(void) {
+static void
+usage(void)
+{
+
printf("wlanstats: [-ah] [-i ifname] [-l] [-m station MAC address] [-o fmt] [interval]\n");
}
diff --git a/tools/tools/net80211/wlanstats/wlanstats.c b/tools/tools/net80211/wlanstats/wlanstats.c
index b42d7312e519..2f362a60a836 100644
--- a/tools/tools/net80211/wlanstats/wlanstats.c
+++ b/tools/tools/net80211/wlanstats/wlanstats.c
@@ -463,7 +463,7 @@ getlladdr(struct wlanstatfoo_p *wf)
errx(1, "did not find link layer address for interface %s",
wf->ifr.ifr_name);
sdl = (const struct sockaddr_dl *) p->ifa_addr;
- IEEE80211_ADDR_COPY(wf->mac, LLADDR(sdl));
+ IEEE80211_ADDR_COPY(wf->mac, CLLADDR(sdl));
freeifaddrs(ifp);
}
@@ -561,8 +561,8 @@ wlan_update_tot(struct bsdstat *sf)
wf->ntotal = wf->ncur;
}
-void
-setreason(char b[], size_t bs, int v)
+static void
+setreason(char b[], size_t bs, unsigned int v)
{
static const char *reasons[] = {
[IEEE80211_REASON_UNSPECIFIED] = "unspecified",
@@ -595,8 +595,8 @@ setreason(char b[], size_t bs, int v)
snprintf(b, bs, "%u", v);
}
-void
-setstatus(char b[], size_t bs, int v)
+static void
+setstatus(char b[], size_t bs, unsigned int v)
{
static const char *status[] = {
[IEEE80211_STATUS_SUCCESS] = "success",