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

edwin edwin at 77e5149b-7576-45b1-b177-96237e5ba77b
Fri Jun 12 19:11:39 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 045433bd719ef3b31eff0fdc877edbb0db1cab65
Author: edwin <edwin at 77e5149b-7576-45b1-b177-96237e5ba77b>
Date:   Mon Apr 20 14:26:53 2009 +0000

    fix some warning
    
    git-svn-id: http://svn.clamav.net/svn/clamav-devel/trunk@5050 77e5149b-7576-45b1-b177-96237e5ba77b

diff --git a/ChangeLog b/ChangeLog
index 7835f42..5dab7f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Apr 20 17:26:41 EEST 2009 (edwin)
+-------------------------------------
+ * unit_tests/check_clamd.c: fix some warning
+
 Mon Apr 20 17:20:27 EEST 2009 (edwin)
 -------------------------------------
  * clamd/server-th.c, unit_tests/check_clamd.c: Fix clamd INSTREAM
diff --git a/unit_tests/check_clamd.c b/unit_tests/check_clamd.c
index 0d77e46..6d3eb2b 100644
--- a/unit_tests/check_clamd.c
+++ b/unit_tests/check_clamd.c
@@ -124,7 +124,6 @@ static void commands_setup(void)
 {
     const char *nonempty = "NONEMPTYFILE";
     int fd = open(NONEXISTENT, O_RDONLY);
-    int rc;
     if (fd != -1) close(fd);
     fail_unless(fd == -1, "Nonexistent file exists!\n");
 
@@ -136,7 +135,7 @@ static void commands_setup(void)
     fail_unless_fmt(fchmod(fd,  S_IWUSR) != -1,
 		    "Failed to chmod: %s\n", strerror(errno));
     /* must not be empty file */
-    fail_unless_fmt(write(fd, nonempty, strlen(nonempty)) == strlen(nonempty),
+    fail_unless_fmt((size_t)write(fd, nonempty, strlen(nonempty)) == strlen(nonempty),
 		    "Failed to write into testfile: %s\n", strerror(errno));
     close(fd);
 
@@ -443,7 +442,6 @@ static int sendmsg_fd(int sockd, const char *mesg, size_t msg_len, int fd, int s
 static void tst_fildes(const char *cmd, size_t len, int fd,
 			const char *expect, size_t expect_len, int closefd, int singlemsg)
 {
-    off_t pos;
     char *recvdata, *p;
     int rc;
 
@@ -495,9 +493,8 @@ START_TEST (test_fildes)
 {
     char nreply[BUFSIZ], nsend[BUFSIZ];
     int fd = open(SCANFILE, O_RDONLY);
-    int closefd;
-    int singlemsg;
-    size_t i;
+    int closefd=0;
+    int singlemsg=0;
     const struct cmds *cmd;
     size_t nreply_len, nsend_len;
 
@@ -542,7 +539,7 @@ END_TEST
 START_TEST (test_fildes_many)
 {
     const char idsession[] = "zIDSESSION";
-    int dummyfd, dummycleanfd, i, killed = 0;
+    int dummyfd, i, killed = 0;
     conn_setup();
     dummyfd = open(SCANFILE, O_RDONLY);
     fail_unless_fmt(dummyfd != -1, "failed to open %s: %s\n", SCANFILE, strerror(errno));
@@ -627,7 +624,7 @@ END_TEST
 START_TEST (test_connections)
 {
     int rc;
-    size_t i;
+    int i;
     struct rlimit rlim;
     int *sock;
     int nf, maxfd=0;
@@ -758,7 +755,6 @@ static void test_idsession_commands(int split, int instream)
 	}
 	if (instream && test->ids == IDS_END) {
 	    uint32_t chunk;
-	    int fd;
 	    /* IDS_END - in middle of other commands, perfect for inserting
 	     * INSTREAM */
 	    fail_unless(p+sizeof(INSTREAM_CMD)+544< buf+sizeof(buf), "Buffer too small");
@@ -787,10 +783,10 @@ static void test_idsession_commands(int split, int instream)
 
     if (split) {
 	/* test corner-cases: 1-byte sends */
-	for (i=0;i<p-buf;i++)
+	for (i=0;i<(size_t)(p-buf);i++)
 	    fail_unless((size_t)send(sockd, &buf[i], 1, 0) == 1, "send() failed: %u, %s\n", i, strerror(errno));
     } else {
-	fail_unless((size_t)send(sockd, buf, p-buf, 0) == p-buf,"send() failed: %s\n", strerror(errno));
+	fail_unless(send(sockd, buf, p-buf, 0) == p-buf,"send() failed: %s\n", strerror(errno));
     }
     recvdata = recvfull(sockd, &len);
     p = recvdata;

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list