Consistently use __dead and __printflike.

This commit is contained in:
joerg 2011-09-06 18:25:14 +00:00
parent f085baab1a
commit d5bd94639a
3 changed files with 13 additions and 17 deletions

View File

@ -1,7 +1,7 @@
/*
* $OpenBSD: patch.c,v 1.45 2007/04/18 21:52:24 sobrado Exp $
* $DragonFly: src/usr.bin/patch/patch.c,v 1.10 2008/08/10 23:39:56 joerg Exp $
* $NetBSD: patch.c,v 1.28 2011/03/26 21:45:48 dholland Exp $
* $NetBSD: patch.c,v 1.29 2011/09/06 18:25:14 joerg Exp $
*/
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: patch.c,v 1.28 2011/03/26 21:45:48 dholland Exp $");
__RCSID("$NetBSD: patch.c,v 1.29 2011/09/06 18:25:14 joerg Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@ -106,7 +106,7 @@ static bool spew_output(void);
static void dump_line(LINENUM, bool);
static bool patch_match(LINENUM, LINENUM, LINENUM);
static bool similar(const char *, const char *, int);
static void usage(void);
__dead static void usage(void);
/* true if -E was specified on command line. */
static bool remove_empty_files = false;

View File

@ -1,7 +1,7 @@
/*
* $OpenBSD: pch.c,v 1.37 2007/09/02 15:19:33 deraadt Exp $
* $DragonFly: src/usr.bin/patch/pch.c,v 1.6 2008/08/10 23:35:40 joerg Exp $
* $NetBSD: pch.c,v 1.23 2008/09/19 18:33:34 joerg Exp $
* $NetBSD: pch.c,v 1.24 2011/09/06 18:25:14 joerg Exp $
*/
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: pch.c,v 1.23 2008/09/19 18:33:34 joerg Exp $");
__RCSID("$NetBSD: pch.c,v 1.24 2011/09/06 18:25:14 joerg Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@ -448,7 +448,7 @@ skip_to(LINENUM file_pos, LINENUM file_line)
}
/* Make this a function for better debugging. */
static void
__dead static void
malformed(void)
{
fatal("malformed patch at line %ld: %s", p_input_line, buf);

View File

@ -1,7 +1,7 @@
/*
* $OpenBSD: util.h,v 1.15 2005/06/20 07:14:06 otto Exp $
* $DragonFly: src/usr.bin/patch/util.h,v 1.2 2007/09/29 23:11:10 swildner Exp $
* $NetBSD: util.h,v 1.11 2008/09/19 18:33:34 joerg Exp $
* $NetBSD: util.h,v 1.12 2011/09/06 18:25:14 joerg Exp $
*/
/*
@ -35,20 +35,16 @@ char *checked_in(char *);
int backup_file(const char *);
int move_file(const char *, const char *);
int copy_file(const char *, const char *);
void say(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
void fatal(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
void pfatal(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
void ask(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
void say(const char *, ...) __printflike(1, 2);
void fatal(const char *, ...) __printflike(1, 2) __dead;
void pfatal(const char *, ...) __printflike(1, 2) __dead;
void ask(const char *, ...) __printflike(1, 2);
char *savestr(const char *);
void set_signals(int);
void ignore_signals(void);
void makedirs(const char *, bool);
void version(void);
void my_exit(int) __attribute__((noreturn));
void version(void) __dead;
void my_exit(int) __dead;
/* in mkpath.c */
extern int mkpath(char *);