The following commit has been merged in the master branch:
commit 88e63fbdaa6d85b698eac06cfa209fa7908c7796
Author: Guillem Jover <[email protected]>
Date: Mon Feb 8 19:04:39 2010 +0100
Move DPKG_ATTR annotations from static declaration to the definition
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index 775818d..8c63ce0 100644
--- a/dpkg-deb/extract.c
+++ b/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 {
diff --git a/dselect/methparse.cc b/dselect/methparse.cc
index ba03903..fb782dc 100644
--- a/dselect/methparse.cc
+++ b/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);
}
diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c
index 17d1b22..46f918e 100644
--- a/lib/dpkg/compress.c
+++ b/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;
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 9ae3a44..9f540ae 100644
--- a/lib/dpkg/ehandle.c
+++ b/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) {
diff --git a/lib/dpkg/myopt.c b/lib/dpkg/myopt.c
index f3209f4..4ee36ee 100644
--- a/lib/dpkg/myopt.c
+++ b/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];
diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index e13c21d..03e9d91 100644
--- a/lib/dpkg/subproc.c
+++ b/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
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index f5a003a..b22097b 100644
--- a/utils/start-stop-daemon.c
+++ b/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)
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]