Changes by: flatcap
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18203/ntfsprogs
Modified Files:
mkntfs.c ntfsclone.c ntfscmp.c ntfsdump_logfile.c ntfsfix.c
ntfsmftalloc.c ntfsresize.c ntfstruncate.c
Log Message:
tidy up some __attribute__ usage
Index: mkntfs.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/mkntfs.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -p -r1.71 -r1.72
--- mkntfs.c 7 Oct 2005 14:10:57 -0000 1.71
+++ mkntfs.c 12 Oct 2005 11:52:40 -0000 1.72
@@ -225,8 +225,7 @@ struct {
/**
* mkDprintf - debugging output (-vv); overridden by quiet (-q)
*/
-static void mkDprintf(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
+__attribute__((format(printf, 1, 2)))
static void mkDprintf(const char *fmt, ...)
{
va_list ap;
@@ -262,9 +261,8 @@ GEN_PRINTF(Qprintf, stdout, &opts.quiet,
/**
* err_exit - error output and terminate; ignores quiet (-q)
*/
-static void err_exit(const char *fmt, ...)
- __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static void err_exit(const char *fmt, ...)
{
va_list ap;
@@ -300,7 +298,7 @@ static void license(void)
/**
* usage - print a list of the parameters to the program
*/
-static void usage(void) __attribute__ ((noreturn));
+__attribute__ ((noreturn))
static void usage(void)
{
copyright();
@@ -987,7 +985,7 @@ static void dump_attr_record(ATTR_RECORD
/**
* dump_mft_record
*/
-static void dump_mft_record(MFT_RECORD *m) __attribute__((unused));
+__attribute__((unused))
static void dump_mft_record(MFT_RECORD *m)
{
ATTR_RECORD *a;
Index: ntfsclone.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsclone.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- ntfsclone.c 7 Oct 2005 14:10:57 -0000 1.55
+++ ntfsclone.c 12 Oct 2005 11:52:41 -0000 1.56
@@ -177,8 +177,7 @@ GEN_PRINTF(Vprintf, msg_out, &opt.verbos
GEN_PRINTF(Qprintf, msg_out, &opt.quiet, FALSE)
static GEN_PRINTF(Printf, msg_out, NULL, FALSE)
-static void perr_printf(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
+__attribute__((format(printf, 1, 2)))
static void perr_printf(const char *fmt, ...)
{
va_list ap;
@@ -192,8 +191,7 @@ static void perr_printf(const char *fmt,
fflush(msg_out);
}
-static void err_printf(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
+__attribute__((format(printf, 1, 2)))
static void err_printf(const char *fmt, ...)
{
va_list ap;
@@ -205,9 +203,8 @@ static void err_printf(const char *fmt,
fflush(msg_out);
}
-static int err_exit(const char *fmt, ...)
- __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static int err_exit(const char *fmt, ...)
{
va_list ap;
@@ -220,9 +217,8 @@ static int err_exit(const char *fmt, ...
exit(1);
}
-static int perr_exit(const char *fmt, ...)
- __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static int perr_exit(const char *fmt, ...)
{
va_list ap;
@@ -238,7 +234,7 @@ static int perr_exit(const char *fmt, ..
}
-static void usage(void) __attribute__((noreturn));
+__attribute__((noreturn))
static void usage(void)
{
Eprintf("\nUsage: %s [OPTIONS] SOURCE\n"
Index: ntfscmp.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfscmp.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- ntfscmp.c 11 Oct 2005 23:09:07 -0000 1.8
+++ ntfscmp.c 12 Oct 2005 11:52:41 -0000 1.9
@@ -67,8 +67,7 @@ GEN_PRINTF(Eprintf, stderr, NULL, FALSE)
GEN_PRINTF(Vprintf, stdout, &opt.verbose, TRUE)
GEN_PRINTF(Qprintf, stdout, NULL, FALSE)
-static void perr_printf(int newline, const char *fmt, ...)
- __attribute__((format(printf, 2, 3)));
+__attribute__((format(printf, 2, 3)))
static void perr_printf(int newline, const char *fmt, ...)
{
va_list ap;
@@ -88,8 +87,7 @@ static void perr_printf(int newline, con
#define perr_print(...) perr_printf(0, __VA_ARGS__)
#define perr_println(...) perr_printf(1, __VA_ARGS__)
-static void err_printf(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
+__attribute__((format(printf, 1, 2)))
static void err_printf(const char *fmt, ...)
{
va_list ap;
@@ -107,9 +105,8 @@ static void err_printf(const char *fmt,
*
* Print and error message and exit the program.
*/
-static int err_exit(const char *fmt, ...)
- __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static int err_exit(const char *fmt, ...)
{
va_list ap;
@@ -128,9 +125,8 @@ static int err_exit(const char *fmt, ...
*
* Print and error message and exit the program
*/
-static int perr_exit(const char *fmt, ...)
- __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static int perr_exit(const char *fmt, ...)
{
va_list ap;
@@ -153,7 +149,7 @@ static int perr_exit(const char *fmt, ..
*
* Return: none
*/
-static void usage(void) __attribute__((noreturn));
+__attribute__((noreturn))
static void usage(void)
{
Index: ntfsdump_logfile.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsdump_logfile.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -r1.30 -r1.31
--- ntfsdump_logfile.c 7 Oct 2005 14:10:57 -0000 1.30
+++ ntfsdump_logfile.c 12 Oct 2005 11:52:41 -0000 1.31
@@ -120,10 +120,9 @@ static int logfile_close(logfile_file *l
* Use when you wish to exit and collate all the cleanups together.
* if you don't have some parameter to pass, just pass NULL.
*/
-void device_err_exit(ntfs_volume *vol, ntfs_inode *ni,
- ntfs_attr *na, const char *fmt, ...) __attribute__ ((noreturn))
- __attribute__ ((format(printf, 4, 5)));
-void device_err_exit(ntfs_volume *vol, ntfs_inode *ni,
+__attribute__ ((noreturn))
+__attribute__ ((format(printf, 4, 5)))
+static void device_err_exit(ntfs_volume *vol, ntfs_inode *ni,
ntfs_attr *na, const char *fmt, ...)
{
va_list ap;
@@ -148,9 +147,9 @@ void device_err_exit(ntfs_volume *vol, n
/**
* log_err_exit -
*/
-void log_err_exit(u8 *buf, const char *fmt, ...) __attribute__ ((noreturn))
- __attribute__((format(printf, 2, 3)));
-void log_err_exit(u8 *buf, const char *fmt, ...)
+__attribute__ ((noreturn))
+__attribute__((format(printf, 2, 3)))
+static void log_err_exit(u8 *buf, const char *fmt, ...)
{
va_list ap;
@@ -169,8 +168,8 @@ void log_err_exit(u8 *buf, const char *f
/**
* usage -
*/
-void usage(const char *exec_name) __attribute__ ((noreturn));
-void usage(const char *exec_name)
+__attribute__ ((noreturn))
+static void usage(const char *exec_name)
{
Eprintf("%s v%s (libntfs %s) - Interpret and display information "
"about the journal\n($LogFile) of an NTFS volume.\n"
Index: ntfsfix.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsfix.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- ntfsfix.c 7 Oct 2005 14:10:57 -0000 1.21
+++ ntfsfix.c 12 Oct 2005 11:52:41 -0000 1.22
@@ -95,7 +95,7 @@ struct {
char *volume;
} opt;
-static int usage(void) __attribute__((noreturn));
+__attribute__((noreturn))
static int usage(void)
{
printf("%s v%s (libntfs %s)\n"
@@ -113,7 +113,7 @@ static int usage(void)
exit(1);
}
-static void version(void) __attribute__((noreturn));
+__attribute__((noreturn))
static void version(void)
{
printf("%s v%s\n\n"
Index: ntfsmftalloc.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmftalloc.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- ntfsmftalloc.c 7 Oct 2005 14:10:57 -0000 1.7
+++ ntfsmftalloc.c 12 Oct 2005 11:52:41 -0000 1.8
@@ -91,8 +91,7 @@ static struct {
/**
* mkDprintf - debugging output (-vv); overridden by quiet (-q)
*/
-static void mkDprintf(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
+__attribute__((format(printf, 1, 2)))
static void mkDprintf(const char *fmt, ...)
{
va_list ap;
@@ -128,8 +127,8 @@ GEN_PRINTF(Qprintf, stdout, &opts.quiet,
/**
* err_exit - error output and terminate; ignores quiet (-q)
*/
-static void err_exit(const char *fmt, ...) __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static void err_exit(const char *fmt, ...)
{
va_list ap;
@@ -167,8 +166,8 @@ static void license(void)
/**
* usage - print a list of the parameters to the program
*/
-void usage(void) __attribute__ ((noreturn));
-void usage (void)
+__attribute__ ((noreturn))
+static void usage (void)
{
copyright();
fprintf(stderr, "Usage: %s [options] device [base-mft-record]\n"
Index: ntfsresize.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsresize.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -p -r1.96 -r1.97
--- ntfsresize.c 7 Oct 2005 14:10:57 -0000 1.96
+++ ntfsresize.c 12 Oct 2005 11:52:41 -0000 1.97
@@ -220,8 +220,7 @@ static s64 rounded_up_division(s64 numer
*
* Print an error message.
*/
-static void perr_printf(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
+__attribute__((format(printf, 1, 2)))
static void perr_printf(const char *fmt, ...)
{
va_list ap;
@@ -236,8 +235,7 @@ static void perr_printf(const char *fmt,
fflush(stderr);
}
-static void err_printf(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
+__attribute__((format(printf, 1, 2)))
static void err_printf(const char *fmt, ...)
{
va_list ap;
@@ -255,9 +253,8 @@ static void err_printf(const char *fmt,
*
* Print and error message and exit the program.
*/
-static int err_exit(const char *fmt, ...)
- __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static int err_exit(const char *fmt, ...)
{
va_list ap;
@@ -276,9 +273,8 @@ static int err_exit(const char *fmt, ...
*
* Print and error message and exit the program
*/
-static int perr_exit(const char *fmt, ...)
- __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static int perr_exit(const char *fmt, ...)
{
va_list ap;
@@ -301,7 +297,7 @@ static int perr_exit(const char *fmt, ..
*
* Return: none
*/
-static void usage(void) __attribute__((noreturn));
+__attribute__((noreturn))
static void usage(void)
{
Index: ntfstruncate.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfstruncate.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- ntfstruncate.c 7 Oct 2005 14:10:57 -0000 1.28
+++ ntfstruncate.c 12 Oct 2005 11:52:42 -0000 1.29
@@ -100,8 +100,7 @@ struct {
/**
* mkDprintf - debugging output (-vv); overridden by quiet (-q)
*/
-static void mkDprintf(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
+__attribute__((format(printf, 1, 2)))
static void mkDprintf(const char *fmt, ...)
{
va_list ap;
@@ -137,9 +136,8 @@ GEN_PRINTF(Qprintf, stdout, &opts.quiet,
/**
* err_exit - error output and terminate; ignores quiet (-q)
*/
-static void err_exit(const char *fmt, ...)
- __attribute__((noreturn))
- __attribute__((format(printf, 1, 2)));
+__attribute__((noreturn))
+__attribute__((format(printf, 1, 2)))
static void err_exit(const char *fmt, ...)
{
va_list ap;
@@ -174,8 +172,8 @@ static void license(void)
/**
* usage - print a list of the parameters to the program
*/
-void usage(void) __attribute__ ((noreturn));
-void usage (void)
+__attribute__ ((noreturn))
+static void usage (void)
{
copyright();
fprintf(stderr, "Usage: %s [options] device inode [attr-type "
|