From: Guillem Jover Date: Wed, 2 Jan 2008 04:36:00 +0000 (+0200) Subject: Use NONRETURNING and PRINTFFORMAT instead of NONRETURNPRINTFFORMAT attribute X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47d1d738543c63564f60e885d57639f6766424f5;p=dpkg Use NONRETURNING and PRINTFFORMAT instead of NONRETURNPRINTFFORMAT attribute --- diff --git a/ChangeLog b/ChangeLog index 78edaf98..90e093af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-01-02 Guillem Jover + + * lib/dpkg.h (NONRETURNPRINTFFORMAT): Remove macro. + (ohshit): Use NONRETURNING and PRINTFFORMAT instead of + NONRETURNPRINTFFORMAT. + (ohshite): Likewise. + (badusage): Likewise. + * utils/start-stop-daemon.c (NONRETURNPRINTFFORMAT): Remove macro. + (fatal): Use NONRETURNING and PRINTFFORMAT instead of + NONRETURNPRINTFFORMAT. + 2008-01-01 Guillem Jover * scripts/dpkg-buildpackage.pl: Use Dpkg::Compression. Use $comp_regex diff --git a/lib/dpkg.h b/lib/dpkg.h index ff3ac9ac..d932f1aa 100644 --- a/lib/dpkg.h +++ b/lib/dpkg.h @@ -159,13 +159,11 @@ extern const char printforhelp[]; # define PRINTFFORMAT(si, tc) __attribute__((format(printf,si,tc))) # define NONRETURNING __attribute__((noreturn)) # define UNUSED __attribute__((unused)) -# define NONRETURNPRINTFFORMAT(si, tc) __attribute__((format(printf,si,tc),noreturn)) #else # define CONSTANT # define PRINTFFORMAT(si, tc) # define NONRETURNING # define UNUSED -# define NONRETURNPRINTFFORMAT(si, tc) #endif /*** from startup.c ***/ @@ -211,11 +209,11 @@ void do_internerr(const char *string, int line, const char *file) NONRETURNING; #define internerr(s) do_internerr(s,__LINE__,__FILE__) struct varbuf; -void ohshit(const char *fmt, ...) NONRETURNPRINTFFORMAT(1,2); +void ohshit(const char *fmt, ...) NONRETURNING PRINTFFORMAT(1, 2); void ohshitv(const char *fmt, va_list al) NONRETURNING; -void ohshite(const char *fmt, ...) NONRETURNPRINTFFORMAT(1,2); +void ohshite(const char *fmt, ...) NONRETURNING PRINTFFORMAT(1, 2); void ohshitvb(struct varbuf*) NONRETURNING; -void badusage(const char *fmt, ...) NONRETURNPRINTFFORMAT(1,2); +void badusage(const char *fmt, ...) NONRETURNING PRINTFFORMAT(1, 2); void werr(const char *what) NONRETURNING; void warningf(const char *fmt, ...); diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index 30bae570..e4bbc414 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -106,13 +106,11 @@ # define PRINTFFORMAT(si, tc) __attribute__((format(printf,si,tc))) # define NONRETURNING __attribute__((noreturn)) # define UNUSED __attribute__((unused)) -# define NONRETURNPRINTFFORMAT(si, tc) __attribute__((format(printf,si,tc),noreturn)) #else # define CONSTANT # define PRINTFFORMAT(si, tc) # define NONRETURNING # define UNUSED -# define NONRETURNPRINTFFORMAT(si, tc) #endif static int testmode = 0; @@ -180,7 +178,7 @@ static int pid_is_exec(pid_t pid, const struct stat *esb); #ifdef __GNUC__ static void fatal(const char *format, ...) - NONRETURNPRINTFFORMAT(1, 2); + NONRETURNING PRINTFFORMAT(1, 2); static void badusage(const char *msg) NONRETURNING; #else