From e2e93a3411009a937679d72237656a8b73bea0cc Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Mon, 20 May 2002 05:56:01 +0000 Subject: [PATCH] Even more gcc warning fixes. --- ChangeLog | 6 ++++++ dpkg-deb/build.c | 1 - dpkg-deb/dpkg-deb.h | 3 ++- include/dpkg.h.in | 2 ++ lib/Makefile.in | 2 +- main/enquiry.c | 1 - main/main.h | 4 ++-- split/dpkg-split.h | 3 ++- split/split.c | 1 - utils/md5sum.c | 5 +---- 10 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 697da806..99b41a1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon May 20 00:58:17 CDT 2002 Adam Heath + + * main/enquiry.c, main/main.h, utils/md5sum.c, split/dpkg-split.h, + split/split.c, lib/Makefile.in, include/dpkg.h.in, dpkg-deb/build.c, + dpkg-deb/dpkg-deb.h: Even more gcc warning fixes. + Sun May 19 23:39:02 CDT 2002 Adam Heath * , Makefile.conf.in: Add rules to Makefile.conf, to diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c index f7ac19c6..a79ab091 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c @@ -198,7 +198,6 @@ 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/dpkg-deb.h b/dpkg-deb/dpkg-deb.h index b6eb9004..6c51c98c 100644 --- a/dpkg-deb/dpkg-deb.h +++ b/dpkg-deb/dpkg-deb.h @@ -23,7 +23,8 @@ #define DPKG_DEB_H typedef void dofunction(const char *const *argv); -dofunction do_build, do_contents, do_control, do_showinfo; +dofunction do_build NONRETURNING; +dofunction do_contents, do_control, do_showinfo; dofunction do_info, do_field, do_extract, do_vextract, do_fsystarfile; extern int debugflag, nocheckflag, oldformatflag; diff --git a/include/dpkg.h.in b/include/dpkg.h.in index 52c63d6e..aa67011f 100644 --- a/include/dpkg.h.in +++ b/include/dpkg.h.in @@ -285,6 +285,8 @@ ssize_t buffer_copy_setup_IntInt(int i1, int typeIn, void *procIn, ssize_t buffer_copy_setup(buffer_arg argIn, int typeIn, void *procIn, buffer_arg argOut, int typeOut, void *procOut, ssize_t limit, const char *desc); +ssize_t buffer_write(buffer_data_t data, void *buf, ssize_t length, const char *desc); +ssize_t buffer_read(buffer_data_t data, void *buf, ssize_t length, const char *desc); ssize_t buffer_copy(buffer_data_t read_data, buffer_data_t write_data, ssize_t limit, const char *desc); extern volatile int onerr_abort; diff --git a/lib/Makefile.in b/lib/Makefile.in index 05b91e57..afadd8e9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -9,7 +9,7 @@ include ../Makefile.conf SOURCES = compat.c database.c dbmodify.c dump.c ehandle.c fields.c \ lock.c mlib.c myopt.c nfmalloc.c parse.c parsehelp.c \ showcright.c showpkg.c tarfn.c varbuf.c vercmp.c md5.c \ - utils.c + utils.c hash.c OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) GENFILES = $(OBJECTS) libdpkg.a diff --git a/main/enquiry.c b/main/enquiry.c index afa54a08..9036bd32 100644 --- a/main/enquiry.c +++ b/main/enquiry.c @@ -455,7 +455,6 @@ 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.h b/main/main.h index 429e3400..79c1c599 100644 --- a/main/main.h +++ b/main/main.h @@ -124,7 +124,7 @@ void assertmulticonrep(const char *const *argv); void predeppackage(const char *const *argv); void printarch(const char *const *argv); void printinstarch(const char *const *argv); -void cmpversions(const char *const *argv); +void cmpversions(const char *const *argv) NONRETURNING; /* Intended for use as a comparison function for qsort when * sorting an array of pointers to struct pkginfo: @@ -157,7 +157,7 @@ void cu_prermremove(int argc, void **argv); /* from errors.c */ -int nerrs; +extern int nerrs; void print_error_perpackage(const char *emsg, const char *arg); void forcibleerr(int forceflag, const char *format, ...) PRINTFFORMAT(2,3); int reportbroken_retexitstatus(void); diff --git a/split/dpkg-split.h b/split/dpkg-split.h index e55fa681..89fda692 100644 --- a/split/dpkg-split.h +++ b/split/dpkg-split.h @@ -23,7 +23,8 @@ #define DPKG_SPLIT_H typedef void dofunction(const char *const *argv); -dofunction do_split, do_join, do_info, do_auto, do_queue, do_discard; +dofunction do_split NONRETURNING; +dofunction do_join, do_info, do_auto, do_queue, do_discard; struct partinfo { const char *filename; diff --git a/split/split.c b/split/split.c index 03c1ac96..aad2904b 100644 --- a/split/split.c +++ b/split/split.c @@ -33,7 +33,6 @@ #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; diff --git a/utils/md5sum.c b/utils/md5sum.c index b0bed507..268206fb 100644 --- a/utils/md5sum.c +++ b/utils/md5sum.c @@ -57,12 +57,10 @@ #endif #endif -extern char *optarg; -extern int optind; const char printforhelp[]= N_("Type md5sum --help for help."); const char thisname[]= MD5SUM; -void usage(void); +void usage(void) NONRETURNING; void print_digest(unsigned char *p); int mdfile(int fd, unsigned char **digest); int do_check(FILE *chkf); @@ -181,7 +179,6 @@ int process_arg(const char* arg, int bin_mode, unsigned char **digest) return 0; } -void usage(void) NONRETURNING; void usage(void) { -- 2.39.5