]> granicus.if.org Git - file/commitdiff
Make this compile with gcc warnings on and make it pass lint. Fix a
authorAnon Ymous <ljt@astron.com>
Tue, 16 Jan 2007 14:54:57 +0000 (14:54 +0000)
committerAnon Ymous <ljt@astron.com>
Tue, 16 Jan 2007 14:54:57 +0000 (14:54 +0000)
puts()/putc() usage error.

src/file.c

index 01a3db75e7b4e7e3113710bcc702182ae7a4ed9f..a2e77301e5dd190533f8d4585f642cf4ff4a7369 100644 (file)
@@ -71,7 +71,7 @@
 #include "patchlevel.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: file.c,v 1.104 2006/11/25 17:28:54 christos Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.105 2007/01/12 17:38:28 christos Exp $")
 #endif /* lint */
 
 
@@ -331,7 +331,7 @@ main(int argc, char *argv[])
 
 private void
 /*ARGSUSED*/
-load(const char *m, int flags)
+load(const char *m __unused, int flags)
 {
        if (magic)
                return;
@@ -404,7 +404,7 @@ process(const char *inname, int wid)
        if (wid > 0 && !bflag) {
                (void)printf("%s", std_in ? "/dev/stdin" : inname);
                if (nulsep)
-                       (void)puts('\0');
+                       (void)putc('\0', stdout);
                else
                        (void)printf("%s", separator);
                (void)printf("%*s ",