[master] 7ef9377 Add casts for to make LLVM on Mac OS X happy

Tollef Fog Heen tfheen at varnish-cache.org
Wed Apr 6 09:29:44 CEST 2011


commit 7ef9377d84ec99de6ebecf67d11cd013eb6fbe04
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Wed Apr 6 09:29:26 2011 +0200

    Add casts for to make LLVM on Mac OS X happy

diff --git a/bin/varnishd/cache_panic.c b/bin/varnishd/cache_panic.c
index 715bfb6..55efa7a 100644
--- a/bin/varnishd/cache_panic.c
+++ b/bin/varnishd/cache_panic.c
@@ -71,15 +71,15 @@ pan_ws(const struct ws *ws, int indent)
 	vsb_printf(vsp, "%*sid = \"%s\",\n", indent + 2, "", ws->id);
 	vsb_printf(vsp, "%*s{s,f,r,e} = {%p", indent + 2, "", ws->s);
 	if (ws->f > ws->s)
-		vsb_printf(vsp, ",+%ld", ws->f - ws->s);
+		vsb_printf(vsp, ",+%ld", (long) (ws->f - ws->s));
 	else
 		vsb_printf(vsp, ",%p", ws->f);
 	if (ws->r > ws->s)
-		vsb_printf(vsp, ",+%ld", ws->r - ws->s);
+		vsb_printf(vsp, ",+%ld", (long) (ws->r - ws->s));
 	else
 		vsb_printf(vsp, ",%p", ws->r);
 	if (ws->e > ws->s)
-		vsb_printf(vsp, ",+%ld", ws->e - ws->s);
+		vsb_printf(vsp, ",+%ld", (long) (ws->e - ws->s));
 	else
 		vsb_printf(vsp, ",%p", ws->e);
 	vsb_printf(vsp, "},\n");



More information about the varnish-commit mailing list