Explorar o código

Even more gcc warning fixes.

Adam Heath %!s(int64=24) %!d(string=hai) anos
pai
achega
e2e93a3411
Modificáronse 10 ficheiros con 16 adicións e 12 borrados
  1. 6 0
      ChangeLog
  2. 0 1
      dpkg-deb/build.c
  3. 2 1
      dpkg-deb/dpkg-deb.h
  4. 2 0
      include/dpkg.h.in
  5. 1 1
      lib/Makefile.in
  6. 0 1
      main/enquiry.c
  7. 2 2
      main/main.h
  8. 2 1
      split/dpkg-split.h
  9. 0 1
      split/split.c
  10. 1 4
      utils/md5sum.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Mon May 20 00:58:17 CDT 2002 Adam Heath <doogie@debian.org>
+
+  * 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 <doogie@debian.org>
 
   * <all Makefile.in>, Makefile.conf.in: Add rules to Makefile.conf, to

+ 0 - 1
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

+ 2 - 1
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;

+ 2 - 0
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;

+ 1 - 1
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

+ 0 - 1
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;

+ 2 - 2
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);

+ 2 - 1
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;

+ 0 - 1
split/split.c

@@ -33,7 +33,6 @@
 #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;

+ 1 - 4
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)
 {