Explorar o código

Use NONRETURNING and PRINTFFORMAT instead of NONRETURNPRINTFFORMAT attribute

Guillem Jover %!s(int64=18) %!d(string=hai) anos
pai
achega
47d1d73854
Modificáronse 3 ficheiros con 15 adicións e 8 borrados
  1. 11 0
      ChangeLog
  2. 3 5
      lib/dpkg.h
  3. 1 3
      utils/start-stop-daemon.c

+ 11 - 0
ChangeLog

@@ -1,3 +1,14 @@
+2008-01-02  Guillem Jover  <guillem@debian.org>
+
+	* 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  <guillem@debian.org>
 
 	* scripts/dpkg-buildpackage.pl: Use Dpkg::Compression. Use $comp_regex

+ 3 - 5
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, ...);
 

+ 1 - 3
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