From: Randy Dunlap <[EMAIL PROTECTED]>

Fix strict gcc warnings in tailf that come from using:
  ("-Wall -Wp,-D_FORTIFY_SOURCE=2")

swapon.c:102: warning: ignoring return value of 'fgets', declared with 
attribute warn_unused_result

Builds cleanly on x86_32 and x86_64.

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 mount/swapon.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- util-linux-ng-2.13.orig/mount/swapon.c
+++ util-linux-ng-2.13/mount/swapon.c
@@ -99,7 +99,9 @@ read_proc_swaps(void) {
                return;         /* nothing wrong */
 
        /* skip the first line */
-       fgets(line, sizeof(line), swaps);
+       if (!fgets(line, sizeof(line), swaps))
+               fprintf (stderr, _("%s: fgets of \"%s\" is empty\n"),
+                       progname, PROC_SWAPS);
 
        while (fgets(line, sizeof(line), swaps)) {
                /*
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to