[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:17:37 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit bb1e844cc2540b2bc211037d081a735ad0aef494
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Wed Jan 27 16:06:12 2010 +0100

    fix some warnings

diff --git a/libclamav/blob.c b/libclamav/blob.c
index 6dee23c..3daa648 100644
--- a/libclamav/blob.c
+++ b/libclamav/blob.c
@@ -620,7 +620,6 @@ int
 fileblobScan(const fileblob *fb)
 {
 	int rc;
-	cli_file_t ftype;
 	struct stat sb;
 
 	if(fb->isInfected)
diff --git a/libclamav/dsig.c b/libclamav/dsig.c
index 0c41efc..4e7cf39 100644
--- a/libclamav/dsig.c
+++ b/libclamav/dsig.c
@@ -61,7 +61,7 @@ static char cli_ndecode(unsigned char value)
     return -1;
 }
 
-unsigned char *cli_decodesig(const char *sig, unsigned int plen, mp_int e, mp_int n)
+static unsigned char *cli_decodesig(const char *sig, unsigned int plen, mp_int e, mp_int n)
 {
 	int i, slen = strlen(sig), dec;
 	unsigned char *plain;
diff --git a/libclamav/libclamav.map b/libclamav/libclamav.map
index 39579c3..a7efe02 100644
--- a/libclamav/libclamav.map
+++ b/libclamav/libclamav.map
@@ -47,7 +47,6 @@ CLAMAV_PRIVATE {
     cli_rmdirs;
     cli_chomp;
     cli_rndnum;
-    cli_decodesig;
 
     cli_calloc;
     cli_ole2_extract;
diff --git a/libclamav/matcher-ac.c b/libclamav/matcher-ac.c
index afb63ff..c290fe5 100644
--- a/libclamav/matcher-ac.c
+++ b/libclamav/matcher-ac.c
@@ -1256,7 +1256,7 @@ int cli_ac_scanbuff(const unsigned char *buffer, uint32_t length, const char **v
 
 static int qcompare(const void *a, const void *b)
 {
-    return *(unsigned char *)a - *(unsigned char *)b;
+    return *(const unsigned char *)a - *(const unsigned char *)b;
 }
 
 /* FIXME: clean up the code */
@@ -1633,7 +1633,7 @@ int cli_ac_addsig(struct cli_matcher *root, const char *virname, const char *hex
     if(new->length > root->maxpatlen)
 	root->maxpatlen = new->length;
 
-    new->virname = cli_mpool_virname(root->mempool, (char *) virname, options & CL_DB_OFFICIAL);
+    new->virname = cli_mpool_virname(root->mempool, virname, options & CL_DB_OFFICIAL);
     if(!new->virname) {
 	mpool_free(root->mempool, new->prefix ? new->prefix : new->pattern);
 	mpool_ac_free_special(root->mempool, new);
diff --git a/libclamav/mbox.c b/libclamav/mbox.c
index e963515..65b511b 100644
--- a/libclamav/mbox.c
+++ b/libclamav/mbox.c
@@ -329,7 +329,7 @@ cli_mbox(const char *dir, int desc, cli_ctx *ctx)
 static int
 cli_parse_mbox(const char *dir, int desc, cli_ctx *ctx)
 {
-	int retcode, i;
+	int retcode;
 	message *body;
 	char buffer[RFC2821LENGTH + 1];
 	mbox_ctx mctx;
diff --git a/libclamav/others.c b/libclamav/others.c
index 6a130a5..e1156bd 100644
--- a/libclamav/others.c
+++ b/libclamav/others.c
@@ -121,7 +121,6 @@ static lt_dlhandle lt_dlfind(const char *name, const char *featurename)
     const lt_dlinfo *info;
     char modulename[128];
     lt_dlhandle rhandle;
-    int canretry=1;
     unsigned i;
 
     if (lt_dladdsearchdir(SEARCH_LIBDIR)) {
diff --git a/libclamav/pdf.c b/libclamav/pdf.c
index 9b2de23..20a4ae1 100644
--- a/libclamav/pdf.c
+++ b/libclamav/pdf.c
@@ -253,7 +253,6 @@ cli_pdf(const char *dir, cli_ctx *ctx, off_t offset)
 					 */
 					if((bytesleft > 11) && strncmp(q, " 0 R", 4) == 0) {
 						const char *r, *nq;
-						size_t len;
 						char b[14];
 
 						q += 4;
diff --git a/libclamav/qsort.c b/libclamav/qsort.c
index c4032f7..018e93b 100644
--- a/libclamav/qsort.c
+++ b/libclamav/qsort.c
@@ -34,6 +34,7 @@
 
 #include "platform.h"
 #include "cltypes.h"
+#include "others.h"
 
 static inline char	*med3(char *, char *, char *, int (*)(const void *, const void *));
 static inline void	 swapfunc(char *, char *, int, int);
@@ -155,11 +156,11 @@ loop:	SWAPINIT(a, es);
 	pn = (char *) a + n * es;
 	r = MIN(pa - (char *)a, pb - pa);
 	vecswap(a, pb - r, r);
-	r = MIN(pd - pc, pn - pd - es);
+	r = MIN((size_t) (pd - pc), (size_t) (pn - pd - es));
 	vecswap(pb, pn - r, r);
-	if ((r = pb - pa) > es)
+	if ((size_t) (r = pb - pa) > es)
 		cli_qsort(a, r / es, es, cmp);
-	if ((r = pd - pc) > es) { 
+	if ((size_t) (r = pd - pc) > es) { 
 		/* Iterate rather than recurse to save stack space */
 		a = pn - r;
 		n = r / es;
diff --git a/libclamav/readdb.c b/libclamav/readdb.c
index 2a2e6ea..49a7a94 100644
--- a/libclamav/readdb.c
+++ b/libclamav/readdb.c
@@ -1984,7 +1984,7 @@ static int cli_loadmd(FILE *fs, struct cl_engine *engine, unsigned int *signo, i
 
 	/* tokens[6] - not used */
 
-	new->filepos[0] = new->filepos[1] = strcmp(tokens[7], "*") ? atoi(tokens[7]) : CLI_OFF_ANY;
+	new->filepos[0] = new->filepos[1] = strcmp(tokens[7], "*") ? atoi(tokens[7]) : (int) CLI_OFF_ANY;
 
 	/* tokens[8] - not used */
 
diff --git a/libclamav/special.c b/libclamav/special.c
index 9b7f5de..954f215 100644
--- a/libclamav/special.c
+++ b/libclamav/special.c
@@ -47,7 +47,7 @@
 
 int cli_check_mydoom_log(int desc, cli_ctx *ctx)
 {
-	int32_t record[8], check;
+	uint32_t record[8], check;
 	int i, retval=CL_VIRUS, j;
 
     cli_dbgmsg("in cli_check_mydoom_log()\n");
diff --git a/libclamav/textnorm.c b/libclamav/textnorm.c
index 86ad61f..ed060ac 100644
--- a/libclamav/textnorm.c
+++ b/libclamav/textnorm.c
@@ -90,7 +90,7 @@ static const enum normalize_action char_action[256] = {
 /* Normalizes the text at @buf of length @buf_len, @buf can include \0 characters.
  * Stores the normalized text in @state's buffer. 
  * Returns how many bytes it consumed of the input. */
-ssize_t text_normalize_buffer(struct text_norm_state *state, const unsigned char *buf, const size_t buf_len)
+size_t text_normalize_buffer(struct text_norm_state *state, const unsigned char *buf, const size_t buf_len)
 {
 	size_t i;
 	const unsigned char *out_end = state->out + state->out_len;
@@ -118,6 +118,6 @@ ssize_t text_normalize_buffer(struct text_norm_state *state, const unsigned char
 		}
 	}
 	state->out_pos = p - state->out;
-	return (ssize_t)i;
+	return i;
 }
 
diff --git a/libclamav/textnorm.h b/libclamav/textnorm.h
index 2d85c19..214989d 100644
--- a/libclamav/textnorm.h
+++ b/libclamav/textnorm.h
@@ -29,4 +29,4 @@ struct text_norm_state {
 
 int text_normalize_init(struct text_norm_state *state, unsigned char *out, size_t out_len);
 void text_normalize_reset(struct text_norm_state* state);
-ssize_t text_normalize_buffer(struct text_norm_state *state, const unsigned char *buf, const size_t buf_len);
+size_t text_normalize_buffer(struct text_norm_state *state, const unsigned char *buf, const size_t buf_len);

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list