summaryrefslogtreecommitdiff
path: root/dpkg-deb
diff options
context:
space:
mode:
authorAdam Heath <doogie@debian.org>2001-04-23 08:59:02 +0000
committerAdam Heath <doogie@debian.org>2001-04-23 08:59:02 +0000
commitea93ed48c17445d01b67f3fa8a20a5a644a89e5b (patch)
tree2883c9ea2b0833ef770fb5ff68fa18ba0acc2973 /dpkg-deb
parentecb9054f73b151acfa0fa81f1e89ce85ce8350c4 (diff)
downloaddpkg-ea93ed48c17445d01b67f3fa8a20a5a644a89e5b.tar.gz
Fixed up several warning types: const, casting, incorrect sizes,
signed/unsigned comparisons.
Diffstat (limited to 'dpkg-deb')
-rw-r--r--dpkg-deb/build.c9
-rw-r--r--dpkg-deb/extract.c2
-rw-r--r--dpkg-deb/main.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index beae6fa8f..41ab539f7 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -73,8 +73,8 @@ static void checkversion(const char *vstring, const char *valuename, int *errs)
*/
static struct _finfo* getfi(const char* root, int fd) {
static char* fn = NULL;
- static int fnlen = 0;
- int i = 0;
+ static size_t fnlen = 0;
+ size_t i= 0;
struct _finfo *fi;
size_t rl = strlen(root);
@@ -206,7 +206,8 @@ void do_build(const char *const *argv) {
char *m;
const char *debar, *directory, *const *mscriptp, *versionstring, *arch;
- char *controlfile, *tfbuf, *envbuf;
+ char *controlfile, *tfbuf;
+ const char *envbuf;
struct pkginfo *checkedinfo;
struct arbitraryfield *field;
FILE *ar, *gz, *cf;
@@ -223,7 +224,7 @@ void do_build(const char *const *argv) {
directory= *argv++; if (!directory) badusage(_("--build needs a directory argument"));
/* template for our tempfiles */
if ((envbuf= getenv("TMPDIR")) == NULL)
- envbuf= (char *)P_tmpdir;
+ envbuf= P_tmpdir;
tfbuf = (char *)malloc(strlen(envbuf)+13);
strcpy(tfbuf,envbuf);
strcat(tfbuf,"/dpkg.XXXXXX");
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index 46475e271..76091533e 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -85,7 +85,7 @@ void extracthalf(const char *debar, const char *directory,
char versionbuf[40];
float versionnum;
char ctrllenbuf[40], *infobuf;
- long ctrllennum, memberlen= 0;
+ size_t ctrllennum, memberlen= 0;
int dummy, l= 0;
pid_t c1=0,c2,c3;
unsigned char *ctrlarea= 0;
diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c
index bb801fd48..c16138615 100644
--- a/dpkg-deb/main.c
+++ b/dpkg-deb/main.c
@@ -136,7 +136,7 @@ static void setaction(const struct cmdinfo *cip, const char *value) {
if (cipaction)
badusage(_("conflicting actions --%s and --%s"),cip->olong,cipaction->olong);
cipaction= cip;
- assert(cip-cmdinfos < sizeof(dofunctions)*sizeof(dofunction*));
+ assert((int)(cip-cmdinfos) < (int)(sizeof(dofunctions)*sizeof(dofunction*)));
action= dofunctions[cip-cmdinfos];
}