summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-12-20 12:34:17 +0000
committered <ed@FreeBSD.org>2011-12-20 12:34:17 +0000
commitfc75227bacc7db62947985b7861cb59e21d7eada (patch)
tree5ad95c732a150fc13176e55bf0eab7c6632a0ad1 /usr.sbin/makefs
parent160dea21a58f6a9b4a693b6565aef2bd7b98c0c1 (diff)
downloadFreeBSD-src-fc75227bacc7db62947985b7861cb59e21d7eada.zip
FreeBSD-src-fc75227bacc7db62947985b7861cb59e21d7eada.tar.gz
Small cleanups to panic() prototype.
- Let panic() use _Noreturn and __printflike() instead of GCC-specific attributes. - Remove prototype from ffs_subr.c and let it include ffs_extern.h. - Forward declare struct inode to make ffs_extern.h not depend on it.
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/ffs/ffs_extern.h5
-rw-r--r--usr.sbin/makefs/ffs/ffs_subr.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/makefs/ffs/ffs_extern.h b/usr.sbin/makefs/ffs/ffs_extern.h
index d95e69b..1c3442f5 100644
--- a/usr.sbin/makefs/ffs/ffs_extern.h
+++ b/usr.sbin/makefs/ffs/ffs_extern.h
@@ -35,6 +35,8 @@
#include "ffs/buf.h"
+struct inode;
+
/*
* Structure used to pass around logical block paths generated by
* ufs_getlbns and used by truncate and bmap code.
@@ -46,8 +48,7 @@ struct indir {
};
/* ffs.c */
-void panic(const char *, ...)
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
+_Noreturn void panic(const char *, ...) __printflike(1, 2);
/* ffs_alloc.c */
int ffs_alloc(struct inode *, daddr_t, daddr_t, int, daddr_t *);
diff --git a/usr.sbin/makefs/ffs/ffs_subr.c b/usr.sbin/makefs/ffs/ffs_subr.c
index b857a58..e6788d0 100644
--- a/usr.sbin/makefs/ffs/ffs_subr.c
+++ b/usr.sbin/makefs/ffs/ffs_subr.c
@@ -38,11 +38,9 @@ __FBSDID("$FreeBSD$");
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
+#include "ffs/ffs_extern.h"
#include "ffs/ufs_bswap.h"
-void panic __P((const char *, ...))
- __attribute__((__noreturn__,__format__(__printf__,1,2)));
-
/*
* Update the frsum fields to reflect addition or deletion
* of some frags.
OpenPOWER on IntegriCloud