diff --git a/ntfsprogs/mkntfs.c b/ntfsprogs/mkntfs.c index 577b2cbe..8293c71d 100644 --- a/ntfsprogs/mkntfs.c +++ b/ntfsprogs/mkntfs.c @@ -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, FALSE) /** * 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 *a) /** * 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; diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index 68854179..1b31f14f 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -177,8 +177,7 @@ GEN_PRINTF(Vprintf, msg_out, &opt.verbose, TRUE) 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" diff --git a/ntfsprogs/ntfscmp.c b/ntfsprogs/ntfscmp.c index 0a47c343..95cd03db 100644 --- a/ntfsprogs/ntfscmp.c +++ b/ntfsprogs/ntfscmp.c @@ -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, const char *fmt, ...) #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) { diff --git a/ntfsprogs/ntfsdump_logfile.c b/ntfsprogs/ntfsdump_logfile.c index b2602a78..24e2647c 100644 --- a/ntfsprogs/ntfsdump_logfile.c +++ b/ntfsprogs/ntfsdump_logfile.c @@ -120,10 +120,9 @@ static int logfile_close(logfile_file *logfile) * 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, ntfs_inode *ni, /** * 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 *fmt, ...) /** * 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" diff --git a/ntfsprogs/ntfsfix.c b/ntfsprogs/ntfsfix.c index 7cd574ad..eab2426d 100644 --- a/ntfsprogs/ntfsfix.c +++ b/ntfsprogs/ntfsfix.c @@ -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" diff --git a/ntfsprogs/ntfsmftalloc.c b/ntfsprogs/ntfsmftalloc.c index 07f2a59a..5237d520 100644 --- a/ntfsprogs/ntfsmftalloc.c +++ b/ntfsprogs/ntfsmftalloc.c @@ -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, FALSE) /** * 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" diff --git a/ntfsprogs/ntfsresize.c b/ntfsprogs/ntfsresize.c index c3d5643f..a38fd5b7 100644 --- a/ntfsprogs/ntfsresize.c +++ b/ntfsprogs/ntfsresize.c @@ -220,8 +220,7 @@ static s64 rounded_up_division(s64 numer, s64 denom) * * 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) { diff --git a/ntfsprogs/ntfstruncate.c b/ntfsprogs/ntfstruncate.c index 2acd49d5..0b455e07 100644 --- a/ntfsprogs/ntfstruncate.c +++ b/ntfsprogs/ntfstruncate.c @@ -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, FALSE) /** * 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 "