Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/gzip Use __printflike and __dead.



details:   https://anonhg.NetBSD.org/src/rev/c19905efd810
branches:  trunk
changeset: 769078:c19905efd810
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Aug 30 23:06:00 2011 +0000

description:
Use __printflike and __dead.

diffstat:

 usr.bin/gzip/gzip.c |  22 ++++++++--------------
 1 files changed, 8 insertions(+), 14 deletions(-)

diffs (60 lines):

diff -r f3ebf19bcabb -r c19905efd810 usr.bin/gzip/gzip.c
--- a/usr.bin/gzip/gzip.c       Tue Aug 30 22:45:55 2011 +0000
+++ b/usr.bin/gzip/gzip.c       Tue Aug 30 23:06:00 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gzip.c,v 1.104 2011/08/17 14:07:31 christos Exp $      */
+/*     $NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -30,7 +30,7 @@
 #ifndef lint
 __COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\
  Matthew R. Green.  All rights reserved.");
-__RCSID("$NetBSD: gzip.c,v 1.104 2011/08/17 14:07:31 christos Exp $");
+__RCSID("$NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $");
 #endif /* not lint */
 
 /*
@@ -185,17 +185,13 @@
 
 static char    *infile;                /* name of file coming in */
 
-static void    maybe_err(const char *fmt, ...)
-    __attribute__((__noreturn__,__format__(__printf__, 1, 2)));
+static void    maybe_err(const char *fmt, ...) __printflike(1, 2) __dead;
 #if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \
     !defined(NO_XZ_SUPPORT)
-static void    maybe_errx(const char *fmt, ...)
-    __attribute__((__noreturn__,__format__(__printf__, 1, 2)));
+static void    maybe_errx(const char *fmt, ...) __printflike(1, 2) __dead;
 #endif
-static void    maybe_warn(const char *fmt, ...)
-    __attribute__((__format__(__printf__, 1, 2)));
-static void    maybe_warnx(const char *fmt, ...)
-    __attribute__((__format__(__printf__, 1, 2)));
+static void    maybe_warn(const char *fmt, ...) __printflike(1, 2);
+static void    maybe_warnx(const char *fmt, ...) __printflike(1, 2);
 static enum filetype file_gettype(u_char *);
 #ifdef SMALL
 #define gz_compress(if, of, sz, fn, tm) gz_compress(if, of, sz)
@@ -210,8 +206,8 @@
 static void    handle_stdout(void);
 static void    print_ratio(off_t, off_t, FILE *);
 static void    print_list(int fd, off_t, const char *, time_t);
-static void    usage(void);
-static void    display_version(void);
+__dead static  void    usage(void);
+__dead static  void    display_version(void);
 static const suffixes_t *check_suffix(char *, int);
 static ssize_t read_retry(int, void *, size_t);
 
@@ -244,8 +240,6 @@
 static off_t   unxz(int, int, char *, size_t, off_t *);
 #endif
 
-int main(int, char *p[]);
-
 #ifdef SMALL
 #define getopt_long(a,b,c,d,e) getopt(a,b,c)
 #else



Home | Main Index | Thread Index | Old Index