Module Name:    src
Committed By:   joerg
Date:           Tue Aug 30 23:08:05 UTC 2011

Modified Files:
        src/usr.bin/compress: compress.c

Log Message:
Use __printflike and __dead


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/compress/compress.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/compress/compress.c
diff -u src/usr.bin/compress/compress.c:1.25 src/usr.bin/compress/compress.c:1.26
--- src/usr.bin/compress/compress.c:1.25	Sat Apr 11 12:24:37 2009
+++ src/usr.bin/compress/compress.c	Tue Aug 30 23:08:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: compress.c,v 1.25 2009/04/11 12:24:37 lukem Exp $	*/
+/*	$NetBSD: compress.c,v 1.26 2011/08/30 23:08:05 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)compress.c	8.2 (Berkeley) 1/7/94";
 #else
-__RCSID("$NetBSD: compress.c,v 1.25 2009/04/11 12:24:37 lukem Exp $");
+__RCSID("$NetBSD: compress.c,v 1.26 2011/08/30 23:08:05 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -55,19 +55,18 @@
 #include <string.h>
 #include <unistd.h>
 
-void	compress(const char *, const char *, int);
-void	cwarn(const char *, ...) __attribute__((__format__(__printf__,1,2)));
-void	cwarnx(const char *, ...) __attribute__((__format__(__printf__,1,2)));
-void	decompress(const char *, const char *, int);
-int	permission(const char *);
-void	setfile(const char *, struct stat *);
-void	usage(int);
+static void	compress(const char *, const char *, int);
+static void	cwarn(const char *, ...) __printflike(1, 2);
+static void	cwarnx(const char *, ...) __printflike(1, 2);
+static void	decompress(const char *, const char *, int);
+static int	permission(const char *);
+static void	setfile(const char *, struct stat *);
+__dead static void	usage(int);
 
-int	main(int, char *[]);
 extern FILE *zopen(const char *fname, const char *mode, int bits);
 
-int eval, force, verbose;
-int isstdout, isstdin;
+static int eval, force, verbose;
+static int isstdout, isstdin;
 
 int
 main(int argc, char **argv)
@@ -198,7 +197,7 @@
 	exit (eval);
 }
 
-void
+static void
 compress(const char *in, const char *out, int bits)
 {
 	size_t nr;
@@ -297,7 +296,7 @@
 		(void)fclose(ifp);
 }
 
-void
+static void
 decompress(const char *in, const char *out, int bits)
 {
 	size_t nr;
@@ -376,7 +375,7 @@
 		(void)fclose(ifp);
 }
 
-void
+static void
 setfile(const char *name, struct stat *fs)
 {
 	static struct timeval tv[2];
@@ -411,7 +410,7 @@
 		cwarn("chflags: %s", name);
 }
 
-int
+static int
 permission(const char *fname)
 {
 	int ch, first;
@@ -425,7 +424,7 @@
 	return (first == 'y');
 }
 
-void
+static void
 usage(int iscompress)
 {
 	if (iscompress)
@@ -437,7 +436,7 @@
 	exit(1);
 }
 
-void
+static void
 cwarnx(const char *fmt, ...)
 {
 	va_list ap;
@@ -448,7 +447,7 @@
 	eval = 1;
 }
 
-void
+static void
 cwarn(const char *fmt, ...)
 {
 	va_list ap;

Reply via email to