Source-Changes-HG archive

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

[src/trunk]: src/sbin/fsck Use __dead and __printflike.



details:   https://anonhg.NetBSD.org/src/rev/aeb5e0dbb00f
branches:  trunk
changeset: 768802:aeb5e0dbb00f
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Aug 27 17:34:44 2011 +0000

description:
Use __dead and __printflike.

diffstat:

 sbin/fsck/fsck.c   |   6 +++---
 sbin/fsck/fsutil.h |  22 ++++++++--------------
 2 files changed, 11 insertions(+), 17 deletions(-)

diffs (69 lines):

diff -r f9921fb8b5fc -r aeb5e0dbb00f sbin/fsck/fsck.c
--- a/sbin/fsck/fsck.c  Sat Aug 27 17:16:01 2011 +0000
+++ b/sbin/fsck/fsck.c  Sat Aug 27 17:34:44 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fsck.c,v 1.49 2010/02/24 13:56:07 hannken Exp $        */
+/*     $NetBSD: fsck.c,v 1.50 2011/08/27 17:34:44 joerg Exp $  */
 
 /*
  * Copyright (c) 1996 Christos Zoulas. All rights reserved.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: fsck.c,v 1.49 2010/02/24 13:56:07 hannken Exp $");
+__RCSID("$NetBSD: fsck.c,v 1.50 2011/08/27 17:34:44 joerg Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -89,7 +89,7 @@
 static void catopt(char **, const char *);
 static void mangle(char *, int *, const char ** volatile *, int *);
 static const char *getfslab(const char *);
-static void usage(void);
+__dead static void usage(void);
 static void *isok(struct fstab *);
 
 int
diff -r f9921fb8b5fc -r aeb5e0dbb00f sbin/fsck/fsutil.h
--- a/sbin/fsck/fsutil.h        Sat Aug 27 17:16:01 2011 +0000
+++ b/sbin/fsck/fsutil.h        Sat Aug 27 17:34:44 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fsutil.h,v 1.17 2011/06/09 21:23:29 christos Exp $     */
+/*     $NetBSD: fsutil.h,v 1.18 2011/08/27 17:34:44 joerg Exp $        */
 
 /*
  * Copyright (c) 1996 Christos Zoulas.  All rights reserved.
@@ -27,18 +27,12 @@
 #include <stdarg.h>
 #include <signal.h>
 
-void errexit(const char *, ...)
-    __attribute__((__noreturn__,__format__(__printf__,1,2)));  
-void pfatal(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));  
-void pwarn(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));  
-void perr(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));  
-void panic(const char *, ...)
-    __attribute__((__noreturn__,__format__(__printf__,1,2)));  
-void vmsg(int, const char *, va_list)
-     __attribute__((__format__(__printf__,2,0)));
+void errexit(const char *, ...) __printflike(1, 2) __dead;
+void pfatal(const char *, ...) __printflike(1, 2);
+void pwarn(const char *, ...) __printflike(1, 2);
+void perr(const char *, ...) __printflike(1, 2);
+void panic(const char *, ...) __printflike(1, 2) __dead;
+void vmsg(int, const char *, va_list) __printflike(2, 0);
 const char *rawname(const char *);
 const char *unrawname(const char *);
 const char *blockcheck(const char *);
@@ -60,6 +54,6 @@
 
 void (*ckfinish)(int);
 volatile sig_atomic_t returntosingle;
-void catch(int);
+void catch(int) __dead;
 void catchquit(int);
 void voidquit(int);



Home | Main Index | Thread Index | Old Index