The following commit has been merged in the master branch:
commit 496a321cd9db4113087bf32da3c0c098a6e0735c
Author: Guillem Jover <[email protected]>
Date:   Mon Feb 8 20:33:30 2010 +0100

    Mark several functions with DPKG_ATTR_NORET

diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c
index 37e42a1..5faa7eb 100644
--- a/dpkg-deb/main.c
+++ b/dpkg-deb/main.c
@@ -49,7 +49,7 @@
 
 const char* showformat = "${Package}\t${Version}\n";
 
-static void
+static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *cip, const char *value)
 {
   printf(_("Debian `%s' package archive backend version %s.\n"),
@@ -64,7 +64,7 @@ printversion(const struct cmdinfo *cip, const char *value)
   exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 usage(const struct cmdinfo *cip, const char *value)
 {
   printf(_(
diff --git a/dpkg-split/main.c b/dpkg-split/main.c
index 381cd6c..eac1d50 100644
--- a/dpkg-split/main.c
+++ b/dpkg-split/main.c
@@ -40,7 +40,7 @@
 
 #include "dpkg-split.h"
 
-static void
+static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *cip, const char *value)
 {
   printf(_("Debian `%s' package split/join tool; version %s.\n"),
@@ -56,7 +56,7 @@ printversion(const struct cmdinfo *cip, const char *value)
   exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 usage(const struct cmdinfo *cip, const char *value)
 {
   printf(_(
diff --git a/dselect/main.cc b/dselect/main.cc
index e40eeca..da9c0de 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -164,7 +164,7 @@ static const char licensestring[]= N_(
       "later for copying conditions. There is NO warranty.\n"
       "See %s --license for copyright and license details.\n");
 
-static void
+static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *ci, const char *value)
 {
   printf(gettext(programdesc), DSELECT, DPKG_VERSION_ARCH);
@@ -176,7 +176,7 @@ printversion(const struct cmdinfo *ci, const char *value)
   exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 usage(const struct cmdinfo *ci, const char *value)
 {
   int i;
diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c
index 46f918e..e20ee21 100644
--- a/lib/dpkg/compress.c
+++ b/lib/dpkg/compress.c
@@ -42,7 +42,7 @@
 #include <dpkg/command.h>
 #include <dpkg/compress.h>
 
-static void DPKG_ATTR_SENTINEL
+static void DPKG_ATTR_NORET DPKG_ATTR_SENTINEL
 fd_fd_filter(int fd_in, int fd_out, const char *desc, const char *file, ...)
 {
        va_list al;
@@ -70,14 +70,14 @@ fd_fd_filter(int fd_in, int fd_out, const char *desc, const 
char *file, ...)
  * No compressor (pass-through).
  */
 
-static void
+static void DPKG_ATTR_NORET
 decompress_none(int fd_in, int fd_out, const char *desc)
 {
        fd_fd_copy(fd_in, fd_out, -1, _("%s: decompression"), desc);
        exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 compress_none(int fd_in, int fd_out, int compress_level, const char *desc)
 {
        fd_fd_copy(fd_in, fd_out, -1, _("%s: compression"), desc);
@@ -97,7 +97,7 @@ struct compressor compressor_none = {
  */
 
 #ifdef WITH_ZLIB
-static void
+static void DPKG_ATTR_NORET
 decompress_gzip(int fd_in, int fd_out, const char *desc)
 {
        char buffer[4096];
@@ -133,7 +133,7 @@ decompress_gzip(int fd_in, int fd_out, const char *desc)
        exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 compress_gzip(int fd_in, int fd_out, int compress_level, const char *desc)
 {
        char buffer[4096];
@@ -180,13 +180,13 @@ compress_gzip(int fd_in, int fd_out, int compress_level, 
const char *desc)
        exit(0);
 }
 #else
-static void
+static void DPKG_ATTR_NORET
 decompress_gzip(int fd_in, int fd_out, const char *desc)
 {
        fd_fd_filter(fd_in, fd_out, desc, GZIP, "-dc", NULL);
 }
 
-static void
+static void DPKG_ATTR_NORET
 compress_gzip(int fd_in, int fd_out, int compress_level, const char *desc)
 {
        char combuf[6];
@@ -209,7 +209,7 @@ struct compressor compressor_gzip = {
  */
 
 #ifdef WITH_BZ2
-static void
+static void DPKG_ATTR_NORET
 decompress_bzip2(int fd_in, int fd_out, const char *desc)
 {
        char buffer[4096];
@@ -245,7 +245,7 @@ decompress_bzip2(int fd_in, int fd_out, const char *desc)
        exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 compress_bzip2(int fd_in, int fd_out, int compress_level, const char *desc)
 {
        char buffer[4096];
@@ -297,13 +297,13 @@ compress_bzip2(int fd_in, int fd_out, int compress_level, 
const char *desc)
        exit(0);
 }
 #else
-static void
+static void DPKG_ATTR_NORET
 decompress_bzip2(int fd_in, int fd_out, const char *desc)
 {
        fd_fd_filter(fd_in, fd_out, desc, BZIP2, "-dc", NULL);
 }
 
-static void
+static void DPKG_ATTR_NORET
 compress_bzip2(int fd_in, int fd_out, int compress_level, const char *desc)
 {
        char combuf[6];
@@ -325,13 +325,13 @@ struct compressor compressor_bzip2 = {
  * Lzma compressor.
  */
 
-static void
+static void DPKG_ATTR_NORET
 decompress_lzma(int fd_in, int fd_out, const char *desc)
 {
        fd_fd_filter(fd_in, fd_out, desc, LZMA, "-dc", NULL);
 }
 
-static void
+static void DPKG_ATTR_NORET
 compress_lzma(int fd_in, int fd_out, int compress_level, const char *desc)
 {
        char combuf[6];
diff --git a/lib/dpkg/compress.h b/lib/dpkg/compress.h
index 2e32642..947a800 100644
--- a/lib/dpkg/compress.h
+++ b/lib/dpkg/compress.h
@@ -34,8 +34,10 @@ struct compressor {
        const char *name;
        const char *extension;
        int default_level;
-       void (*compress)(int fd_in, int fd_out, int level, const char *desc);
-       void (*decompress)(int fd_in, int fd_out, const char *desc);
+       void (*compress)(int fd_in, int fd_out, int level, const char *desc)
+               DPKG_ATTR_NORET;
+       void (*decompress)(int fd_in, int fd_out, const char *desc)
+               DPKG_ATTR_NORET;
 };
 
 struct compressor compressor_none;
diff --git a/lib/dpkg/myopt.c b/lib/dpkg/myopt.c
index 4ee36ee..428255c 100644
--- a/lib/dpkg/myopt.c
+++ b/lib/dpkg/myopt.c
@@ -48,7 +48,7 @@ badusage(const char *fmt, ...)
   ohshit("%s\n\n%s", buf, gettext(printforhelp));
 }
 
-static void DPKG_ATTR_PRINTF(3)
+static void DPKG_ATTR_NORET DPKG_ATTR_PRINTF(3)
 config_error(const char *file_name, int line_num, const char *fmt, ...)
 {
   char buf[1024];
diff --git a/lib/dpkg/parsedump.h b/lib/dpkg/parsedump.h
index 5785817..5dff80c 100644
--- a/lib/dpkg/parsedump.h
+++ b/lib/dpkg/parsedump.h
@@ -66,7 +66,7 @@ struct fieldinfo {
 };
 
 void parse_error(struct parsedb_state *ps, const struct pkginfo *pigp,
-                 const char *fmt, ...) DPKG_ATTR_PRINTF(3);
+                 const char *fmt, ...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(3);
 void parse_warn(struct parsedb_state *ps, const struct pkginfo *pigp,
                 const char *fmt, ...) DPKG_ATTR_PRINTF(3);
 void parse_must_have_field(struct parsedb_state *ps,
diff --git a/lib/dpkg/triglib.c b/lib/dpkg/triglib.c
index 4825f58..81f93ea 100644
--- a/lib/dpkg/triglib.c
+++ b/lib/dpkg/triglib.c
@@ -282,7 +282,7 @@ trk_unknown_activate_done(void)
 {
 }
 
-static void
+static void DPKG_ATTR_NORET
 trk_unknown_interest_change(const char *trig, struct pkginfo *pkg, int signum)
 {
        ohshit(_("invalid or unknown syntax in trigger name `%.250s'"
diff --git a/src/main.c b/src/main.c
index 1e6b87c..6065d35 100644
--- a/src/main.c
+++ b/src/main.c
@@ -50,7 +50,7 @@
 #include "main.h"
 #include "filesdb.h"
 
-static void
+static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *ci, const char *value)
 {
   printf(_("Debian `%s' package management program version %s.\n"),
@@ -68,7 +68,7 @@ printversion(const struct cmdinfo *ci, const char *value)
    options that need fixing:
   dpkg --yet-to-unpack                 \n\
   */
-static void
+static void DPKG_ATTR_NORET
 usage(const struct cmdinfo *ci, const char *value)
 {
   printf(_(
diff --git a/src/query.c b/src/query.c
index f230216..b19f734 100644
--- a/src/query.c
+++ b/src/query.c
@@ -556,7 +556,7 @@ control_path(const char *const *argv)
   modstatdb_shutdown();
 }
 
-static void
+static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *ci, const char *value)
 {
   printf(_("Debian `%s' package management program query tool\n"), DPKGQUERY);
@@ -570,7 +570,7 @@ printversion(const struct cmdinfo *ci, const char *value)
   exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 usage(const struct cmdinfo *ci, const char *value)
 {
   printf(_(
diff --git a/src/statcmd.c b/src/statcmd.c
index 6ab16e7..13fe8d1 100644
--- a/src/statcmd.c
+++ b/src/statcmd.c
@@ -51,7 +51,7 @@ const char printforhelp[] = N_(
 "Use --help for help about querying packages;\n"
 "Use --license for copyright license and lack of warranty (GNU GPL).");
 
-static void
+static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *cip, const char *value)
 {
        printf(_("Debian %s version %s.\n"), thisname, DPKG_VERSION_ARCH);
@@ -69,7 +69,7 @@ printversion(const struct cmdinfo *cip, const char *value)
        exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 usage(const struct cmdinfo *cip, const char *value)
 {
        printf(_(
diff --git a/src/trigcmd.c b/src/trigcmd.c
index 11b3210..3e72ffe 100644
--- a/src/trigcmd.c
+++ b/src/trigcmd.c
@@ -45,7 +45,7 @@ const char thisname[] = "dpkg-trigger";
 const char printforhelp[] = N_(
 "Type dpkg-trigger --help for help about this utility.");
 
-static void
+static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *ci, const char *value)
 {
        printf(_("Debian %s package trigger utility.\n"), thisname);
@@ -60,7 +60,7 @@ printversion(const struct cmdinfo *ci, const char *value)
        exit(0);
 }
 
-static void
+static void DPKG_ATTR_NORET
 usage(const struct cmdinfo *ci, const char *value)
 {
        printf(_(

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to