r4440 - in trunk/varnish-cache: bin/varnishd lib/libvarnish lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Fri Jan 8 17:53:38 CET 2010


Author: phk
Date: 2010-01-08 17:53:38 +0100 (Fri, 08 Jan 2010)
New Revision: 4440

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_vary.c
   trunk/varnish-cache/bin/varnishd/flint.lnt
   trunk/varnish-cache/lib/libvarnish/time.c
   trunk/varnish-cache/lib/libvcl/vcc_backend.c
Log:
Various flexelint nits.



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2010-01-08 12:27:52 UTC (rev 4439)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2010-01-08 16:53:38 UTC (rev 4440)
@@ -654,7 +654,7 @@
 void RES_WriteObj(struct sess *sp);
 
 /* cache_vary.c */
-struct vsb *VRY_Create(const struct sess *sp, struct http *hp);
+struct vsb *VRY_Create(const struct sess *sp, const struct http *hp);
 int VRY_Match(const struct sess *sp, const unsigned char *vary);
 
 /* cache_vcl.c */

Modified: trunk/varnish-cache/bin/varnishd/cache_vary.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vary.c	2010-01-08 12:27:52 UTC (rev 4439)
+++ trunk/varnish-cache/bin/varnishd/cache_vary.c	2010-01-08 16:53:38 UTC (rev 4440)
@@ -64,7 +64,7 @@
 #include "cache.h"
 
 struct vsb *
-VRY_Create(const struct sess *sp, struct http *hp)
+VRY_Create(const struct sess *sp, const struct http *hp)
 {
 	char *v, *p, *q, *h, *e;
 	struct vsb *sb, *sbh;

Modified: trunk/varnish-cache/bin/varnishd/flint.lnt
===================================================================
--- trunk/varnish-cache/bin/varnishd/flint.lnt	2010-01-08 12:27:52 UTC (rev 4439)
+++ trunk/varnish-cache/bin/varnishd/flint.lnt	2010-01-08 16:53:38 UTC (rev 4440)
@@ -203,6 +203,8 @@
 -esym(528, vcl_handlingname)	// Not referenced
 -e641	// Converting enum 'cli_status_e' to int
 
+-e441	//  for clause irregularity: loop variable '___' not found in 2nd for expression
+
 // Review all below this line ///////////////////////////////////////////////
 
 -e732   // 183 Loss of sign (___) (___ to ___)

Modified: trunk/varnish-cache/lib/libvarnish/time.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/time.c	2010-01-08 12:27:52 UTC (rev 4439)
+++ trunk/varnish-cache/lib/libvarnish/time.c	2010-01-08 16:53:38 UTC (rev 4440)
@@ -163,8 +163,8 @@
 {
 	struct timespec ts;
 
-	ts.tv_sec = floor(t);
-	ts.tv_nsec = floor((t - ts.tv_sec) * 1e9);
+	ts.tv_sec = (time_t)floor(t);
+	ts.tv_nsec = (long)floor((t - ts.tv_sec) * 1e9);
 
 #ifdef HAVE_NANOSLEEP
 	(void)nanosleep(&ts, NULL);

Modified: trunk/varnish-cache/lib/libvcl/vcc_backend.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_backend.c	2010-01-08 12:27:52 UTC (rev 4439)
+++ trunk/varnish-cache/lib/libvcl/vcc_backend.c	2010-01-08 16:53:38 UTC (rev 4440)
@@ -100,7 +100,7 @@
 Emit_Sockaddr(struct tokenlist *tl, const struct token *t_host,
     const char *port)
 {
-	struct addrinfo *res, *res0, hint;
+	struct addrinfo *res, *res0, *res1, hint;
 	int n4, n6, len, error, retval;
 	const char *emit, *multiple;
 	unsigned char *u;
@@ -138,9 +138,9 @@
 			    "Please specify which exact address "
 			    "you want to use, we found these:\n",
 			    PF(t_host), multiple);
-			for (res = res0; res != NULL; res = res->ai_next) {
-				error = getnameinfo(res->ai_addr,
-				    res->ai_addrlen, hbuf, sizeof hbuf,
+			for (res1 = res0; res1 != NULL; res1 = res1->ai_next) {
+				error = getnameinfo(res1->ai_addr,
+				    res1->ai_addrlen, hbuf, sizeof hbuf,
 				    NULL, 0, NI_NUMERICHOST);
 				AZ(error);
 				vsb_printf(tl->sb, "\t%s\n", hbuf);
@@ -190,7 +190,7 @@
  */
 
 static void
-vcc_EmitBeIdent(struct tokenlist *tl, struct vsb *v, 
+vcc_EmitBeIdent(const struct tokenlist *tl, struct vsb *v, 
     int serial, const struct token *first, const struct token *last)
 {
 



More information about the varnish-commit mailing list