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

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


The following commit has been merged in the debian/unstable branch:
commit 4197268c874890e96902762f433442da88c86d13
Author: tkojm <tkojm at 77e5149b-7576-45b1-b177-96237e5ba77b>
Date:   Tue May 5 14:14:40 2009 +0000

    fix type errors
    
    
    git-svn-id: http://svn.clamav.net/svn/clamav-devel/trunk@5059 77e5149b-7576-45b1-b177-96237e5ba77b

diff --git a/clamconf/clamconf.c b/clamconf/clamconf.c
index 42570ee..a1ade4d 100644
--- a/clamconf/clamconf.c
+++ b/clamconf/clamconf.c
@@ -81,10 +81,10 @@ static void printopts(struct optstruct *opts, int nondef)
 
 	    case TYPE_NUMBER:
 	    case TYPE_SIZE:
-		printf("%s = \"%d\"", opts->name, opts->numarg);
+		printf("%s = \"%lld\"", opts->name, opts->numarg);
 		opt = opts;
 		while((opt = opt->nextarg))
-		    printf(", \"%d\"", opt->numarg);
+		    printf(", \"%lld\"", opt->numarg);
 		printf("\n");
 		break;
 
@@ -143,7 +143,7 @@ static int printconf(const char *name)
 
 		case TYPE_NUMBER:
 		    if(cpt->numarg != -1)
-			printf("# Default: %d\n", cpt->numarg);
+			printf("# Default: %lld\n", cpt->numarg);
 		    else
 			printf("# Default: disabled\n");
 		    break;
@@ -151,7 +151,7 @@ static int printconf(const char *name)
 		case TYPE_SIZE:
 		    printf("# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)\n# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size\n# in bytes just don't use modifiers.\n");
 		    if(cpt->numarg != -1)
-			printf("# Default: %d\n", cpt->numarg);
+			printf("# Default: %lld\n", cpt->numarg);
 		    else
 			printf("# Default: disabled\n");
 		    break;
diff --git a/clamd/clamd.c b/clamd/clamd.c
index 8e5c84c..09d3477 100644
--- a/clamd/clamd.c
+++ b/clamd/clamd.c
@@ -405,7 +405,7 @@ int main(int argc, char **argv)
 
     if((opt = optget(opts, "DevACDepth"))->enabled) {
         cl_engine_set_num(engine, CL_ENGINE_AC_MAXDEPTH, opt->numarg);
-	logg("#Max A-C depth set to %u\n", opt->numarg);
+	logg("#Max A-C depth set to %u\n", (unsigned int) opt->numarg);
     }
 
     if((ret = cl_load(dbdir, engine, &sigs, dboptions))) {
diff --git a/clamd/tcpserver.c b/clamd/tcpserver.c
index d3ee7be..6d2bdf2 100644
--- a/clamd/tcpserver.c
+++ b/clamd/tcpserver.c
@@ -60,8 +60,7 @@ int tcpserver(const struct optstruct *opts)
 {
     struct sockaddr_in server;
     int sockfd, backlog;
-    struct hostent he;
-    char *estr, buf[1024];
+    char *estr;
     int true = 1;
 
     if (cfg_tcpsock(opts, &server, INADDR_ANY) == -1) {
@@ -86,9 +85,9 @@ int tcpserver(const struct optstruct *opts)
     } else {
 	const struct optstruct *taddr = optget(opts, "TCPAddr");
 	if(taddr->enabled)
-	    logg("#TCP: Bound to address %s on port %u\n", taddr->strarg, optget(opts, "TCPSocket")->numarg);
+	    logg("#TCP: Bound to address %s on port %u\n", taddr->strarg, (unsigned int) optget(opts, "TCPSocket")->numarg);
 	else
-	    logg("#TCP: Bound to port %u\n", optget(opts, "TCPSocket")->numarg);
+	    logg("#TCP: Bound to port %u\n", (unsigned int) optget(opts, "TCPSocket")->numarg);
     }
 
     backlog = optget(opts, "MaxConnectionQueueLength")->numarg;
diff --git a/clamdtop/clamdtop.c b/clamdtop/clamdtop.c
index 7f99517..8a957c6 100644
--- a/clamdtop/clamdtop.c
+++ b/clamdtop/clamdtop.c
@@ -1147,7 +1147,7 @@ static void setup_connections(int argc, char *argv[])
 		if ((opt_addr = optget(clamd_opts, "TCPAddr"))->enabled) {
 		    host = opt_addr->strarg;
 		}
-		snprintf(buf, sizeof(buf), "%s:%u", host, opt->numarg);
+		snprintf(buf, sizeof(buf), "%s:%llu", host, opt->numarg);
 		conn = strdup(buf);
 	    } else {
 		fprintf(stderr, "Can't find how to connect to clamd\n");
diff --git a/freshclam/notify.c b/freshclam/notify.c
index d0aed63..861cc7d 100644
--- a/freshclam/notify.c
+++ b/freshclam/notify.c
@@ -110,7 +110,7 @@ int notify(const char *cfgfile)
 	hints.ai_family = AF_INET;
 #endif
 	hints.ai_socktype = SOCK_STREAM;
-	snprintf(port, 5, "%d", opt->numarg);
+	snprintf(port, 5, "%d", (unsigned int) opt->numarg);
 	port[5] = 0;
 
 	if((opt = optget(opts, "TCPAddr"))->enabled)

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list