From e34aacbd37f8174564ba5264f5439d2d8488cd9c Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Mon, 8 Dec 2014 21:01:54 -0600 Subject: [PATCH] wmifinfo: Fix -Wformat compiler warnings. --- wmifinfo/nwn.c | 2 +- wmifinfo/wmifinfo.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wmifinfo/nwn.c b/wmifinfo/nwn.c index 0602b27..281b665 100644 --- a/wmifinfo/nwn.c +++ b/wmifinfo/nwn.c @@ -65,7 +65,7 @@ int nwn_get_link(char *ifname) if((inbssid == 1) && (strcmp(key, "Quality") == 0)) { - sscanf(val, "%X", &link); + sscanf(val, "%X", (unsigned int *) &link); link *= 4; inbssid = 0; } diff --git a/wmifinfo/wmifinfo.c b/wmifinfo/wmifinfo.c index 827afec..438423f 100644 --- a/wmifinfo/wmifinfo.c +++ b/wmifinfo/wmifinfo.c @@ -512,7 +512,8 @@ int getifinfo(char *ifname, struct ifinfo_t *info) fseek(froute, 0, 0); while(fgets(buf, sizeof(buf), froute)) { - sscanf(buf, "%s %x %x", a, &b, &c); + sscanf(buf, "%s %x %x", a, (unsigned int *) &b, + (unsigned int *) &c); if((strcmp(a, info->id) == 0) && (b == 0)) { info->gw = c;