From 1a81cb90f48a065600730bdc8da91bf213c0fe2c Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 1 Jun 2005 14:55:45 +0000 Subject: Fix some warnings on 64-bit archs. Reviewed by: sam --- sbin/ifconfig/ifieee80211.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sbin/ifconfig/ifieee80211.c') diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index 887e6da..8f85741 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -85,6 +85,7 @@ #include #include #include +#include #include #include #include @@ -431,16 +432,16 @@ set80211chanlist(const char *val, int d, int s, const struct afswtch *rafp) switch (sscanf(cp, "%u-%u", &first, &last)) { case 1: if (first > MAXCHAN) - errx(-1, "channel %u out of range, max %u", + errx(-1, "channel %u out of range, max %zu", first, MAXCHAN); setbit(chanlist.ic_channels, first); break; case 2: if (first > MAXCHAN) - errx(-1, "channel %u out of range, max %u", + errx(-1, "channel %u out of range, max %zu", first, MAXCHAN); if (last > MAXCHAN) - errx(-1, "channel %u out of range, max %u", + errx(-1, "channel %u out of range, max %zu", last, MAXCHAN); if (first > last) errx(-1, "void channel range, %u > %u", @@ -688,7 +689,7 @@ printie(const char* tag, const uint8_t *ie, size_t ielen, int maxlen) * to hexadecimal. If the result is truncated then replace the last * three characters with "...". */ -static size_t +static int copy_essid(char buf[], size_t bufsize, const u_int8_t *essid, size_t essid_len) { const u_int8_t *p; @@ -1263,10 +1264,10 @@ printkey(const struct ieee80211req_key *ik) printf(">"); if (ik->ik_type != IEEE80211_CIPHER_WEP && (ik->ik_keyrsc != 0 || verbose)) - printf(" rsc %llu", ik->ik_keyrsc); + printf(" rsc %ju", (uintmax_t)ik->ik_keyrsc); if (ik->ik_type != IEEE80211_CIPHER_WEP && (ik->ik_keytsc != 0 || verbose)) - printf(" tsc %llu", ik->ik_keytsc); + printf(" tsc %ju", (uintmax_t)ik->ik_keytsc); if (ik->ik_flags != 0 && verbose) { const char *sep = " "; -- cgit v1.1