[Pkg-wmaker-commits] [wmifinfo] 29/49: wmifinfo: Fix -Wunused-but-set-variable compiler warning.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 18 02:07:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmifinfo.

commit 7d99bfeaf5549f09a41de23ce744c8fb6de26afd
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Mon Dec 8 21:01:50 2014 -0600

    wmifinfo: Fix -Wunused-but-set-variable compiler warning.
---
 wmifinfo.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/wmifinfo.c b/wmifinfo.c
index 51e0dc3..cc6ee99 100644
--- a/wmifinfo.c
+++ b/wmifinfo.c
@@ -406,7 +406,6 @@ char *strupper(char *str)
 int getifinfo(char *ifname, struct ifinfo_t *info)
 {
 	struct ifreq ifr;
-	int r;
 	struct sockaddr_in *sa;
 
 #ifdef linux
@@ -510,7 +509,7 @@ int getifinfo(char *ifname, struct ifinfo_t *info)
 		fseek(froute, 0, 0);
 
 		while(fgets(buf, sizeof(buf), froute)) {
-			r = sscanf(buf, "%s %x %x", a, &b, &c);
+			sscanf(buf, "%s %x %x", a, &b, &c);
 
 			if((strcmp(a, info->id) == 0) && (b == 0)) {
 				info->gw = c;
@@ -575,7 +574,7 @@ int getifinfo(char *ifname, struct ifinfo_t *info)
 		fseek(fwireless, 0, 0);
 
 		while(fgets(buf, sizeof(buf), fwireless)) {
-			r = sscanf(buf, "%s %d %d ", a, &b, &c);
+			sscanf(buf, "%s %d %d ", a, &b, &c);
 			if(strchr(a, ':'))  *(strchr(a, ':')) = 0;
 			if(strcmp(a, parent) == 0) {
 				info->sl = c;
@@ -611,7 +610,7 @@ int getifinfo(char *ifname, struct ifinfo_t *info)
 		fseek(fdev, 0, 0);
 
 		while(fgets(buf, sizeof(buf), fdev)) {
-			r = sscanf(buf, "%s %d %d %d %d %d %d %d %d %d", a, &b, &d,&d,&d,&d,&d,&d,&d, &c);
+			sscanf(buf, "%s %d %d %d %d %d %d %d %d %d", a, &b, &d,&d,&d,&d,&d,&d,&d, &c);
 			if(strchr(a, ':'))  *(strchr(a, ':')) = 0;
 			if(strcmp(a, parent) == 0) {
 				info->bytes = b + c;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmifinfo.git



More information about the Pkg-wmaker-commits mailing list