[master] 88db48c Cast through void* to remove clang warning

Martin Blix Grydeland martin at varnish-cache.org
Wed May 15 15:29:04 CEST 2013


commit 88db48cb016857add18b025d961e13fcb2a13a33
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed May 15 15:28:12 2013 +0200

    Cast through void* to remove clang warning

diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index 60679fd..ec73a98 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -338,14 +338,14 @@ VSM__itern(const struct VSM_data *vd, struct VSM_fantom *vf)
 			return (0); /* free'd during iteration */
 		if (vf->chunk->next == 0)
 			return (0); /* last */
-		c = (struct VSM_chunk *)(vd->b + vf->chunk->next);
+		c = (struct VSM_chunk *)(void*)(vd->b + vf->chunk->next);
 		assert(c != vf->chunk);
 	} else if (vd->head->first == 0) {
 		return (0);	/* empty vsm */
 	} else {
 		/* get first chunk */
 		AZ(vf->chunk);
-		c = (struct VSM_chunk *)(vd->b + vd->head->first);
+		c = (struct VSM_chunk *)(void*)(vd->b + vd->head->first);
 	}
 	AN(c);
 	if (memcmp(c->marker, VSM_CHUNK_MARKER, sizeof c->marker))



More information about the varnish-commit mailing list