netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ifenslave: Fix unused variable warnings.
@ 2011-11-26 21:54 David Miller
  0 siblings, 0 replies; only message in thread
From: David Miller @ 2011-11-26 21:54 UTC (permalink / raw)
  To: netdev


Documentation/networking/ifenslave.c: In function ‘if_getconfig’:
Documentation/networking/ifenslave.c:508:14: warning: variable ‘mtu’ set but not used [-Wunused-but-set-variable]
Documentation/networking/ifenslave.c:508:6: warning: variable ‘metric’ set but not used [-Wunused-but-set-variable]

The purpose of this function is to simply print out the values
it probes, so...

Signed-off-by: David S. Miller <davem@davemloft.net>
---

More annoying warnings, committed to net-next.

 Documentation/networking/ifenslave.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c
index 65968fb..ac5debb 100644
--- a/Documentation/networking/ifenslave.c
+++ b/Documentation/networking/ifenslave.c
@@ -539,12 +539,14 @@ static int if_getconfig(char *ifname)
 		metric = 0;
 	} else
 		metric = ifr.ifr_metric;
+	printf("The result of SIOCGIFMETRIC is %d\n", metric);
 
 	strcpy(ifr.ifr_name, ifname);
 	if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0)
 		mtu = 0;
 	else
 		mtu = ifr.ifr_mtu;
+	printf("The result of SIOCGIFMTU is %d\n", mtu);
 
 	strcpy(ifr.ifr_name, ifname);
 	if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) {
-- 
1.7.6.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-26 21:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-26 21:54 [PATCH] ifenslave: Fix unused variable warnings David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).