From: Adam Heath Date: Sun, 22 Apr 2001 07:48:15 +0000 (+0000) Subject: Added macro NONRETURNING to several functions. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9bef0784a047c9ea984a4a68b610e32f73dee92;p=dpkg Added macro NONRETURNING to several functions. --- diff --git a/ChangeLog b/ChangeLog index 09b396a2..4e853ff3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Apr 22 02:46:06 CDT 2001 Adam Heath + + * 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 * main/filesdb: change initialization of putat in diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c index 713c03a7..beae6fa8 100644 --- a/dpkg-deb/build.c +++ b/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 diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c index f93e5509..46475e27 100644 --- a/dpkg-deb/extract.c +++ b/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); diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c index 7da26b19..bb801fd4 100644 --- a/dpkg-deb/main.c +++ b/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; diff --git a/lib/mlib.c b/lib/mlib.c index a0f10e5b..f6411931 100644 --- a/lib/mlib.c +++ b/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 diff --git a/lib/showcright.c b/lib/showcright.c index bb28a193..5b232c0f 100644 --- a/lib/showcright.c +++ b/lib/showcright.c @@ -26,6 +26,7 @@ #include #include +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); diff --git a/main/enquiry.c b/main/enquiry.c index 4d5fd934..8f8bb13d 100644 --- a/main/enquiry.c +++ b/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; diff --git a/main/main.c b/main/main.c index 08a10728..94da90df 100644 --- a/main/main.c +++ b/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")); diff --git a/split/main.c b/split/main.c index 88c2dd99..349aa1d9 100644 --- a/split/main.c +++ b/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; diff --git a/split/split.c b/split/split.c index 9b7ec963..0d0c240f 100644 --- a/split/split.c +++ b/split/split.c @@ -33,6 +33,7 @@ #include #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")); } - - - diff --git a/utils/md5sum.c b/utils/md5sum.c index b564957a..b84c430d 100644 --- a/utils/md5sum.c +++ b/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() { diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index 44b5d126..6f9b541d 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -1034,6 +1034,7 @@ x_finished: } +int main(int argc, char **argv) NONRETURNING; int main(int argc, char **argv) {