[master] 17df9a6 Fix compilation errors (set-but-unused variables)

Tollef Fog Heen tfheen at varnish-cache.org
Mon Jul 11 10:44:03 CEST 2011


commit 17df9a6a0656a4b11487d7b9c9fdafcadde0af91
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Mon Jul 11 10:43:36 2011 +0200

    Fix compilation errors (set-but-unused variables)
    
    Thanks to new GCC for spotting those.

diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c
index f52eb4b..4788a23 100644
--- a/bin/varnishd/cache_response.c
+++ b/bin/varnishd/cache_response.c
@@ -265,6 +265,7 @@ res_WriteGunzipObj(struct sess *sp)
 		    st->ptr, st->len,
 		    obuf, sizeof obuf, &obufl);
 		/* XXX: error check */
+		(void)i;
 	}
 	if (obufl) {
 		(void)WRW_Write(sp->wrk, obuf, obufl);
diff --git a/bin/varnishreplay/varnishreplay.c b/bin/varnishreplay/varnishreplay.c
index 71a9c81..f7355cb 100644
--- a/bin/varnishreplay/varnishreplay.c
+++ b/bin/varnishreplay/varnishreplay.c
@@ -494,7 +494,6 @@ replay_thread(void *arg)
 	struct replay_thread *thr = arg;
 	struct message *msg;
 	enum VSL_tag_e tag;
-	size_t len;
 	char *ptr;
 	const char *next;
 
@@ -504,7 +503,6 @@ replay_thread(void *arg)
 
 	while ((msg = mailbox_get(&thr->mbox)) != NULL) {
 		tag = msg->tag;
-		len = msg->len;
 		ptr = msg->ptr;
 
 		thread_log(2, 0, "%s(%s)", VSL_tags[tag], msg->ptr);
@@ -639,14 +637,11 @@ gen_traffic(void *priv, enum VSL_tag_e tag, unsigned fd,
     unsigned len, unsigned spec, const char *ptr, uint64_t bitmap)
 {
 	struct replay_thread *thr;
-	const char *end;
 	struct message *msg;
 
 	(void)priv;
 	(void)bitmap;
 
-	end = ptr + len;
-
 	if (fd == 0 || !(spec & VSL_S_CLIENT))
 		return (0);
 



More information about the varnish-commit mailing list