From 647d79b9e0febbaa6a0578ee15649d70c72391e2 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sun, 24 Dec 2000 03:27:43 +0000 Subject: [PATCH] Clean up a few gcc warnings. Note that the warning: "deprecated conversion from string constant to `char *'" is actually a bug in ncurses-dev(which has been filed as 80410) not setting the fmt argument as const. --- ChangeLog | 10 ++++++++++ dpkg-deb/extract.c | 2 +- include/dpkg.h.in | 2 +- lib/mlib.c | 4 ++-- main/enquiry.c | 2 +- main/filesdb.c | 2 +- main/packages.c | 2 +- main/remove.c | 2 +- po/dpkg.pot | 2 +- utils/start-stop-daemon.c | 2 +- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ffbfd0f1..f69eb256 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Sat Dec 23 21:20:43 CST 2000 Adam Heath + + * dpkg-deb/extract.c, include/dpkg.h.in, lib/mlib.c, + main/enquiry.c, main/filesdb.c, main/packages.c, main/remove.c, + utils/start-stop-daemon.c: Clean up a few gcc warnings. Note, + that the warning: + "deprecated conversion from string constant to `char *'" + is actually a bug in ncurses-dev(which has been filed as 80410) + not setting the fmt argument as const. + Sat Dec 23 19:33:05 CST 2000 Adam Heath * automake/dpkg.m4, configure.in, Makefile.conf.in: diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c index f32ecb34..1b8d41d4 100644 --- a/dpkg-deb/extract.c +++ b/dpkg-deb/extract.c @@ -94,7 +94,7 @@ void extracthalf(const char *debar, const char *directory, char nlc; char *cur; struct ar_hdr arh; - int readfromfd, oldformat, header_done, adminmember; + int readfromfd, oldformat= 0, header_done, adminmember; #if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0) fpos_t fpos; #endif diff --git a/include/dpkg.h.in b/include/dpkg.h.in index 4d929922..4b130184 100644 --- a/include/dpkg.h.in +++ b/include/dpkg.h.in @@ -245,7 +245,7 @@ struct buffer_data { limit, desc) ssize_t buffer_copy_setup(void *argIn, int typeIn, void *procIn, void *argOut, int typeOut, void *procOut, - ssize_t limit, char *desc, ...); + ssize_t limit, const char *desc, ...); ssize_t buffer_copy(buffer_data_t read_data, buffer_data_t write_data, ssize_t limit, char *desc); extern volatile int onerr_abort; diff --git a/lib/mlib.c b/lib/mlib.c index 44b4faea..2392b638 100644 --- a/lib/mlib.c +++ b/lib/mlib.c @@ -129,7 +129,7 @@ ssize_t buffer_write(buffer_data_t data, void *buf, ssize_t length, char *desc) switch(data->type) { case BUFFER_WRITE_BUF: memcpy(data->data, buf, length); - data->data += length; + (char*)data->data += length; break; case BUFFER_WRITE_VBUF: varbufaddbuf((struct varbuf *)data->data, buf, length); @@ -175,7 +175,7 @@ ssize_t buffer_read(buffer_data_t data, void *buf, ssize_t length, char *desc) { ssize_t buffer_copy_setup(void *argIn, int typeIn, void *procIn, void *argOut, int typeOut, void *procOut, - ssize_t limit, char *desc, ...) + ssize_t limit, const char *desc, ...) { struct buffer_data read_data = { procIn, argIn, typeIn }, write_data = { procOut, argOut, typeOut }; diff --git a/main/enquiry.c b/main/enquiry.c index d4705321..3035b8cb 100644 --- a/main/enquiry.c +++ b/main/enquiry.c @@ -666,7 +666,7 @@ void printarch(const char *const *argv) { { 0,0,0 } }, *archp; - const char *ccompiler, *arch; + const char *ccompiler, *arch= NULL; int p1[2]; pid_t c1; FILE *ccpipe; diff --git a/main/filesdb.c b/main/filesdb.c index 0180d35a..fe86f47f 100644 --- a/main/filesdb.c +++ b/main/filesdb.c @@ -602,7 +602,7 @@ struct fileiterator *iterfilestart(void) { } struct filenamenode *iterfilenext(struct fileiterator *i) { - struct filenamenode *r; + struct filenamenode *r= NULL; switch (f_largemem) { case 1: while (!i->u.high.namenode) { diff --git a/main/packages.c b/main/packages.c index 0cb6aaaa..4085936f 100644 --- a/main/packages.c +++ b/main/packages.c @@ -132,7 +132,7 @@ void process_queue(void) { struct pkginqueue *removeent, *rundown; struct pkginfo *volatile pkg; jmp_buf ejbuf; - enum istobes istobe; + enum istobes istobe= itb_normal; clear_istobes(); diff --git a/main/remove.c b/main/remove.c index b5a0fc61..0e6658d7 100644 --- a/main/remove.c +++ b/main/remove.c @@ -182,7 +182,7 @@ void removal_bulk(struct pkginfo *pkg) { static struct varbuf fnvb, removevb; - int before, r, foundpostrm, removevbbase; + int before, r, foundpostrm= 0, removevbbase; int infodirbaseused, conffnameused, conffbasenamelen, pkgnameused; char *conffbasename; struct reversefilelistiter rlistit; diff --git a/po/dpkg.pot b/po/dpkg.pot index 8b8522cf..1b6432af 100644 --- a/po/dpkg.pot +++ b/po/dpkg.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-12-23 18:54-0600\n" +"POT-Creation-Date: 2000-12-23 20:46-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index 2b67b5ae..7e0c6128 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -70,7 +70,7 @@ static int runas_uid = -1; static int runas_gid = -1; static const char *userspec = NULL; static char *changeuser = NULL; -static char *changegroup = NULL; +static const char *changegroup = NULL; static char *changeroot = NULL; static const char *cmdname = NULL; static char *execname = NULL; -- 2.39.5