Просмотр исходного кода

Added macro NONRETURNING to several functions.

Adam Heath лет назад: 25
Родитель
Сommit
c9bef0784a
12 измененных файлов с 26 добавлено и 3 удалено
  1. 7 0
      ChangeLog
  2. 2 0
      dpkg-deb/build.c
  3. 1 0
      dpkg-deb/extract.c
  4. 3 0
      dpkg-deb/main.c
  5. 1 0
      lib/mlib.c
  6. 1 0
      lib/showcright.c
  7. 1 0
      main/enquiry.c
  8. 3 0
      main/main.c
  9. 3 0
      split/main.c
  10. 1 3
      split/split.c
  11. 2 0
      utils/md5sum.c
  12. 1 0
      utils/start-stop-daemon.c

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+Sun Apr 22 02:46:06 CDT 2001 Adam Heath <doogie@debian.org>
+
+  * dpkg-deb/build.c, dpkg-deb/extract.c, dpkg-deb/main.c, lib/mlib.c(*),
+    lib/showcopyright.c, main/enquiry.c, main/main.c, split/main.c,
+    split/split.c, utils/md5sum.c, utils/start-stop-daemon.c: Added
+    macro NONRETURNING to several functions.
+
 Sun Apr 22 02:02:34 CEST 2001 Wichert Akkerman <wakkerma@debian.org>
 
   * main/filesdb: change initialization of putat in

+ 2 - 0
dpkg-deb/build.c

@@ -142,6 +142,7 @@ static void free_filist(struct _finfo* fi) {
   }
 }
 
+int internalGzip(int fd1, int fd2, const char *compression, char *desc, ...) NONRETURNING;
 int internalGzip(int fd1, int fd2, const char *compression, char *desc, ...) {
   va_list al;
   struct varbuf v;
@@ -197,6 +198,7 @@ int internalGzip(int fd1, int fd2, const char *compression, char *desc, ...) {
 
 /* Overly complex function that builds a .deb file
  */
+void do_build(const char *const *argv) NONRETURNING;
 void do_build(const char *const *argv) {
   static const char *const maintainerscripts[]= {
     PREINSTFILE, POSTINSTFILE, PRERMFILE, POSTRMFILE, 0

+ 1 - 0
dpkg-deb/extract.c

@@ -53,6 +53,7 @@ static void movecontrolfiles(const char *thing) {
   waitsubproc(c1,"sh -c mv foo/* &c",0,0);
 }
 
+static void readfail(FILE *a, const char *filename, const char *what) NONRETURNING;
 static void readfail(FILE *a, const char *filename, const char *what) {
   if (ferror(a)) {
     ohshite(_("error reading %s from %.255s"),what,filename);

+ 3 - 0
dpkg-deb/main.c

@@ -86,9 +86,11 @@ const char* compression=NULL;
 const struct cmdinfo *cipaction=0;
 dofunction *action=0;
 
+static void helponly(const struct cmdinfo *cip, const char *value) NONRETURNING;
 static void helponly(const struct cmdinfo *cip, const char *value) {
   usage(); exit(0);
 }
+static void versiononly(const struct cmdinfo *cip, const char *value) NONRETURNING;
 static void versiononly(const struct cmdinfo *cip, const char *value) {
   printversion(); exit(0);
 }
@@ -138,6 +140,7 @@ static void setaction(const struct cmdinfo *cip, const char *value) {
   action= dofunctions[cip-cmdinfos];
 }
 
+int main(int argc, const char *const *argv) NONRETURNING;
 int main(int argc, const char *const *argv) {
   jmp_buf ejbuf;
 

+ 1 - 0
lib/mlib.c

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

+ 1 - 0
lib/showcright.c

@@ -26,6 +26,7 @@
 #include <config.h>
 #include <dpkg.h>
 
+void showcopyright(const struct cmdinfo *c, const char *v) NONRETURNING;
 void showcopyright(const struct cmdinfo *c, const char *v) {
   int fd;
   fd= open(COPYINGFILE,O_RDONLY);

+ 1 - 0
main/enquiry.c

@@ -725,6 +725,7 @@ void printarch(const char *const *argv) {
   if (fflush(stdout)) werr("stdout");
 }
 
+void cmpversions(const char *const *argv) NONRETURNING;
 void cmpversions(const char *const *argv) {
   struct relationinfo {
     const char *string;

+ 3 - 0
main/main.c

@@ -171,9 +171,11 @@ static const struct forceinfo {
   {  0                                                  }
 };
 
+static void helponly(const struct cmdinfo *cip, const char *value) NONRETURNING;
 static void helponly(const struct cmdinfo *cip, const char *value) {
   usage(); exit(0);
 }
+static void versiononly(const struct cmdinfo *cip, const char *value) NONRETURNING;
 static void versiononly(const struct cmdinfo *cip, const char *value) {
   printversion(); exit(0);
 }
@@ -418,6 +420,7 @@ static const struct cmdinfo cmdinfos[]= {
   {  0,                   0                                                          }
 };
 
+static void execbackend(int argc, const char *const *argv) NONRETURNING;
 static void execbackend(int argc, const char *const *argv) {
   execvp(BACKEND, (char* const*) argv);
   ohshite(_("failed to exec dpkg-deb"));

+ 3 - 0
split/main.c

@@ -83,9 +83,11 @@ void rerreof(FILE *f, const char *fn) {
   ohshit(_("unexpected end of file in %.250s"),fn);
 }
 
+static void helponly(const struct cmdinfo *cip, const char *value) NONRETURNING;
 static void helponly(const struct cmdinfo *cip, const char *value) {
   usage(); exit(0);
 }
+static void versiononly(const struct cmdinfo *cip, const char *value) NONRETURNING;
 static void versiononly(const struct cmdinfo *cip, const char *value) {
   printversion(); exit(0);
 }
@@ -145,6 +147,7 @@ static void setaction(const struct cmdinfo *cip, const char *value) {
   action= dofunctions[cip-cmdinfos];
 }
 
+int main(int argc, const char *const *argv) NONRETURNING;
 int main(int argc, const char *const *argv) {
   jmp_buf ejbuf;
   int l;

+ 1 - 3
split/split.c

@@ -33,6 +33,7 @@
 #include <dpkg-db.h>
 #include "dpkg-split.h"
 
+void do_split(const char *const *argv) NONRETURNING;
 void do_split(const char *const *argv) {
   const char *sourcefile, *prefix;
   char *palloc;
@@ -69,6 +70,3 @@ void do_split(const char *const *argv) {
         (char*)0);
   ohshite(_("unable to exec mksplit"));
 }
-
-
-

+ 2 - 0
utils/md5sum.c

@@ -72,6 +72,7 @@ char *progname;
 int verbose = 0;
 int bin_mode = 0;
 
+int main(int argc, char **argv) NONRETURNING;
 int
 main(int argc, char **argv)
 {
@@ -136,6 +137,7 @@ main(int argc, char **argv)
 	exit(rc);
 }
 
+void usage() NONRETURNING;
 void
 usage()
 {

+ 1 - 0
utils/start-stop-daemon.c

@@ -1034,6 +1034,7 @@ x_finished:
 }
 
 
+int main(int argc, char **argv) NONRETURNING;
 int
 main(int argc, char **argv)
 {