[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Tomasz Kojm tkojm at clamav.net
Sun Apr 4 01:21:13 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 2979de20da0dc70da49c017aaee5924cc416a4c0
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Fri Feb 19 16:10:37 2010 +0100

    fix some compiler warnings

diff --git a/libclamav/macho.c b/libclamav/macho.c
index 937d9b0..0ca6022 100644
--- a/libclamav/macho.c
+++ b/libclamav/macho.c
@@ -514,8 +514,6 @@ int cli_scanmacho_unibin(cli_ctx *ctx)
 	struct macho_fat_arch fat_arch;
 	unsigned int conv, i, matcher = 0;
 	int ret = CL_CLEAN;
-	struct stat sb;
-	off_t pos;
 	fmap_t *map = *ctx->fmap;
 	ssize_t at;
 
diff --git a/libclamav/readdb.c b/libclamav/readdb.c
index c2b4e2a..cf1f230 100644
--- a/libclamav/readdb.c
+++ b/libclamav/readdb.c
@@ -121,7 +121,7 @@ int cli_parse_add(struct cli_matcher *root, const char *virname, const char *hex
     if (hexsig[0] == '$') {
 	/* macro */
 	unsigned smin, smax, tid;
-	struct cli_ac_patt *pt;
+	struct cli_ac_patt *patt;
 	if (hexsig[hexlen-1] != '$') {
 	    cli_errmsg("cli_parseadd(): missing terminator $\n");
 	    return CL_EMALFDB;
@@ -139,24 +139,24 @@ int cli_parse_add(struct cli_matcher *root, const char *virname, const char *hex
 	    cli_errmsg("cli_parseadd(): only 32 macro groups are supported\n");
 	    return CL_EMALFDB;
 	}
-	pt = mpool_calloc(root->mempool, 1, sizeof(*pt));
-	if (!pt)
+	patt = mpool_calloc(root->mempool, 1, sizeof(*patt));
+	if (!patt)
 	    return CL_EMEM;
 	/* this is not a pattern that will be matched by AC itself, rather it is a
 	 * pattern checked by the lsig code */
-	pt->ch_mindist[0] = smin;
-	pt->ch_maxdist[0] = smax;
-	pt->sigid = tid;
-	pt->length = root->ac_mindepth;
+	patt->ch_mindist[0] = smin;
+	patt->ch_maxdist[0] = smax;
+	patt->sigid = tid;
+	patt->length = root->ac_mindepth;
 	/* dummy */
-	pt->pattern = mpool_calloc(root->mempool, pt->length, sizeof(*pt->pattern));
-	if (pt->pattern) {
-	    free(pt);
+	patt->pattern = mpool_calloc(root->mempool, patt->length, sizeof(*patt->pattern));
+	if (patt->pattern) {
+	    free(patt);
 	    return CL_EMEM;
 	}
-	if ((ret = cli_ac_addpatt(root, pt))) {
-	    mpool_free(root->mempool, pt->pattern);
-	    free(pt);
+	if ((ret = cli_ac_addpatt(root, patt))) {
+	    mpool_free(root->mempool, patt->pattern);
+	    free(patt);
 	    return ret;
 	}
 	return CL_SUCCESS;
@@ -2455,8 +2455,7 @@ static int cli_loaddbdir(const char *dirname, struct cl_engine *engine, unsigned
 	    if(!daily_cvd) {
 		cli_errmsg("cli_loaddbdir(): error parsing header of %s\n", dbfile);
 		free(dbfile);
-		if(have_cld)
-		    cl_cvdfree(daily_cld);
+		cl_cvdfree(daily_cld);
 		closedir(dd);
 		return CL_EMALFDB;
 	    }
diff --git a/libclamav/str.c b/libclamav/str.c
index 9a36416..ae1b981 100644
--- a/libclamav/str.c
+++ b/libclamav/str.c
@@ -137,7 +137,7 @@ uint16_t *cli_hex2ui(const char *hex)
 
 char *cli_hex2str(const char *hex)
 {
-    unsigned char *str;
+    char *str;
     size_t len;
 
     len = strlen(hex);
@@ -158,11 +158,11 @@ char *cli_hex2str(const char *hex)
     return str;
 }
 
-int cli_hex2str_to(const char *hex, unsigned char *ptr, size_t len)
+int cli_hex2str_to(const char *hex, char *ptr, size_t len)
 {
     size_t i;
     int c;
-    unsigned char val;
+    char val;
 
     for(i = 0; i < len; i += 2) {
 	if((c = cli_hex2int(hex[i])) >= 0) {
diff --git a/libclamav/str.h b/libclamav/str.h
index 8641143..751d32e 100644
--- a/libclamav/str.h
+++ b/libclamav/str.h
@@ -36,7 +36,7 @@ int cli_chomp(char *string);
 char *cli_strtok(const char *line, int field, const char *delim);
 int cli_realhex2ui(const char *hex, uint16_t *ptr, unsigned int len);
 uint16_t *cli_hex2ui(const char *hex);
-int  cli_hex2str_to(const char *hex, unsigned char *ptr, size_t len);
+int  cli_hex2str_to(const char *hex, char *ptr, size_t len);
 char *cli_hex2str(const char *hex);
 int cli_hex2num(const char *hex);
 char *cli_str2hex(const char *string, unsigned int len);

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list