Browse Source

Move DPKG_ATTR annotations from static declaration to the definition

Guillem Jover 16 years ago
parent
commit
88e63fbdaa
7 changed files with 14 additions and 27 deletions
  1. 3 2
      dpkg-deb/extract.c
  2. 5 4
      dselect/methparse.cc
  3. 1 4
      lib/dpkg/compress.c
  4. 1 3
      lib/dpkg/ehandle.c
  5. 1 4
      lib/dpkg/myopt.c
  6. 1 3
      lib/dpkg/subproc.c
  7. 2 7
      utils/start-stop-daemon.c

+ 3 - 2
dpkg-deb/extract.c

@@ -59,8 +59,9 @@ static void movecontrolfiles(const char *thing) {
   subproc_wait_check(c1, "sh -c mv foo/* &c", 0);
 }
 
-static void readfail(FILE *a, const char *filename, const char *what) DPKG_ATTR_NORET;
-static void readfail(FILE *a, const char *filename, const char *what) {
+static void DPKG_ATTR_NORET
+readfail(FILE *a, const char *filename, const char *what)
+{
   if (ferror(a)) {
     ohshite(_("error reading %s from file %.255s"), what, filename);
   } else {

+ 5 - 4
dselect/methparse.cc

@@ -47,14 +47,15 @@ int noptions=0;
 struct dselect_option *options=0, *coption=0;
 struct method *methods=0;
 
-static void badmethod(const char *pathname, const char *why) DPKG_ATTR_NORET;
-static void badmethod(const char *pathname, const char *why)
+static void DPKG_ATTR_NORET
+badmethod(const char *pathname, const char *why)
 {
   ohshit(_("syntax error in method options file `%.250s' -- %s"), pathname, why);
 }
 
-static void eofmethod(const char *pathname, FILE *f, const char *why) DPKG_ATTR_NORET;
-static void eofmethod(const char *pathname, FILE *f, const char *why) {
+static void DPKG_ATTR_NORET
+eofmethod(const char *pathname, FILE *f, const char *why)
+{
   if (ferror(f)) ohshite(_("error reading options file `%.250s'"),pathname);
   badmethod(pathname,why);
 }

+ 1 - 4
lib/dpkg/compress.c

@@ -42,10 +42,7 @@
 #include <dpkg/command.h>
 #include <dpkg/compress.h>
 
-static void fd_fd_filter(int fd_in, int fd_out, const char *desc,
-                         const char *file, ...) DPKG_ATTR_SENTINEL;
-
-static void
+static void DPKG_ATTR_SENTINEL
 fd_fd_filter(int fd_in, int fd_out, const char *desc, const char *file, ...)
 {
 	va_list al;

+ 1 - 3
lib/dpkg/ehandle.c

@@ -78,9 +78,7 @@ void set_error_display(error_printer *printerror,
   econtext->contextstring= contextstring;
 }
 
-static void run_error_handler(void) DPKG_ATTR_NORET;
-
-static void
+static void DPKG_ATTR_NORET
 run_error_handler(void)
 {
   if (onerr_abort) {

+ 1 - 4
lib/dpkg/myopt.c

@@ -48,10 +48,7 @@ badusage(const char *fmt, ...)
   ohshit("%s\n\n%s", buf, gettext(printforhelp));
 }
 
-static void config_error(const char *file_name, int line_num,
-                         const char *fmt, ...) DPKG_ATTR_PRINTF(3);
-
-static void
+static void DPKG_ATTR_PRINTF(3)
 config_error(const char *file_name, int line_num, const char *fmt, ...)
 {
   char buf[1024];

+ 1 - 3
lib/dpkg/subproc.c

@@ -77,9 +77,7 @@ print_error_forked(const char *emsg, const char *contextstring)
 	fprintf(stderr, _("%s (subprocess): %s\n"), thisname, emsg);
 }
 
-static void subproc_fork_cleanup(int argc, void **argv) DPKG_ATTR_NORET;
-
-static void
+static void DPKG_ATTR_NORET
 subproc_fork_cleanup(int argc, void **argv)
 {
 	/* Don't do the other cleanups, because they'll be done by/in the

+ 2 - 7
utils/start-stop-daemon.c

@@ -218,11 +218,6 @@ static bool pid_is_exec(pid_t pid, const struct stat *esb);
 #endif
 
 
-static void fatal(const char *format, ...)
-	DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1);
-static void badusage(const char *msg)
-	DPKG_ATTR_NORET;
-
 static void
 warning(const char *format, ...)
 {
@@ -234,7 +229,7 @@ warning(const char *format, ...)
 	va_end(arglist);
 }
 
-static void
+static void DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1)
 fatal(const char *format, ...)
 {
 	va_list arglist;
@@ -421,7 +416,7 @@ do_version(void)
 	printf("Written by Marek Michalkiewicz, public domain.\n");
 }
 
-static void
+static void DPKG_ATTR_NORET
 badusage(const char *msg)
 {
 	if (msg)