[pisa-src] r1319 - trunk/test/ifaddr.c
- From: Thomas Jansen <mithi@xxxxxxxxx>
- To: pisa-src@xxxxxxxxxxxxx
- Date: Tue, 27 Oct 2009 15:02:38 +0100
Author: tjansen
Date: Tue Oct 27 15:02:38 2009
New Revision: 1319
Log:
Fixed warnings:
ifaddr.c: In function ‘print_ifaddr’:
ifaddr.c:58: warning: ignoring return value of ‘fgets’, declared with attribute
warn_unused_result
ifaddr.c:59: warning: ignoring return value of ‘fgets’, declared with attribute
warn_unused_result
Modified:
trunk/test/ifaddr.c
Modified: trunk/test/ifaddr.c
==============================================================================
--- trunk/test/ifaddr.c Tue Oct 27 14:56:47 2009 (r1318)
+++ trunk/test/ifaddr.c Tue Oct 27 15:02:38 2009 (r1319)
@@ -55,8 +55,10 @@
return -1;
}
- fgets(buf, sizeof(buf), fh); /* eat line */
- fgets(buf, sizeof(buf), fh);
+ if (!fgets(buf, sizeof(buf), fh)) /* eat line */
+ printf("no line to eat\n");
+ if (!fgets(buf, sizeof(buf), fh))
+ printf("no line to eat\n");
while (fgets(buf, sizeof(buf), fh)) {
s = get_ifname(name, buf);
Other related posts:
- » [pisa-src] r1319 - trunk/test/ifaddr.c - Thomas Jansen