r1367 - in trunk/varnish-cache: bin/varnishd bin/varnishncsa lib/libvarnishapi lib/libvcl

des at projects.linpro.no des at projects.linpro.no
Tue Apr 24 14:37:58 CEST 2007


Author: des
Date: 2007-04-24 14:37:58 +0200 (Tue, 24 Apr 2007)
New Revision: 1367

Modified:
   trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishncsa/varnishncsa.c
   trunk/varnish-cache/lib/libvarnishapi/shmlog.c
   trunk/varnish-cache/lib/libvcl/vcc_priv.h
Log:
Eliminate warnings.


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c	2007-04-24 12:36:58 UTC (rev 1366)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c	2007-04-24 12:37:58 UTC (rev 1367)
@@ -70,13 +70,6 @@
 	AZ(epoll_ctl(epfd, EPOLL_CTL_DEL, fd, &ev));
 }
 
-static void
-vca_rcvhdev(struct sess *sp)
-{
-
-	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
-}
-
 static void *
 vca_main(void *arg)
 {

Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2007-04-24 12:36:58 UTC (rev 1366)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2007-04-24 12:37:58 UTC (rev 1367)
@@ -74,6 +74,10 @@
 #include "compat/clock_gettime.h"
 #endif
 
+#ifndef HAVE_SRANDOMDEV
+#include "compat/srandomdev.h"
+#endif
+
 #include "shmlog.h"
 #include "vcl.h"
 #include "cache.h"

Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c
===================================================================
--- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c	2007-04-24 12:36:58 UTC (rev 1366)
+++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c	2007-04-24 12:37:58 UTC (rev 1367)
@@ -278,13 +278,13 @@
 		/* %u: decode authorization string */
 		if (lp->df_u != NULL) {
 			char *rubuf;
-			size_t len;
+			size_t rulen;
 
 			base64_init();
-			len = ((strlen(lp->df_u) + 3) * 4) / 3;
-			rubuf = malloc(len);
+			rulen = ((strlen(lp->df_u) + 3) * 4) / 3;
+			rubuf = malloc(rulen);
 			assert(rubuf != NULL);
-			base64_decode(rubuf, len, lp->df_u);
+			base64_decode(rubuf, rulen, lp->df_u);
 			q = strchr(rubuf, ':');
 			if (q != NULL)
 				*q = '\0';

Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2007-04-24 12:36:58 UTC (rev 1366)
+++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2007-04-24 12:37:58 UTC (rev 1367)
@@ -284,14 +284,14 @@
 		if (vd->regincl != NULL) {
 			rm.rm_so = 0;
 			rm.rm_eo = p[1];
-			i = regexec(vd->regincl, p + 4, 1, &rm, 0);
+			i = regexec(vd->regincl, (char *)p + 4, 1, &rm, 0);
 			if (i == REG_NOMATCH)
 				continue;
 		}
 		if (vd->regexcl != NULL) {
 			rm.rm_so = 0;
 			rm.rm_eo = p[1];
-			i = regexec(vd->regexcl, p + 4, 1, &rm, 0);
+			i = regexec(vd->regexcl, (char *)p + 4, 1, &rm, 0);
 			if (i != REG_NOMATCH)
 				continue;
 		}
@@ -318,7 +318,7 @@
 		if (func(priv,
 		    p[0], u, p[1],
 		    vd->map[u] & (VSL_S_CLIENT|VSL_S_BACKEND),
-		    p + 4))
+		    (char *)p + 4))
 			return (1);
 	}
 }

Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_priv.h	2007-04-24 12:36:58 UTC (rev 1366)
+++ trunk/varnish-cache/lib/libvcl/vcc_priv.h	2007-04-24 12:37:58 UTC (rev 1367)
@@ -43,4 +43,4 @@
 void vcl_init_tnames(void);
 void vcl_output_lang_h(struct vsb *sb);
 
-#define PF(t)	((t)->e - (t)->b), (t)->b
+#define PF(t)	(int)((t)->e - (t)->b), (t)->b




More information about the varnish-commit mailing list