[master] eb28fe773 more 32bit fixes

Nils Goroll nils.goroll at uplex.de
Thu Nov 1 16:44:08 UTC 2018


commit eb28fe7733eee2fe365ad50365dd6c0f63509fb5
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Nov 1 17:39:45 2018 +0100

    more 32bit fixes

diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index c04c926d2..6816451aa 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -565,7 +565,7 @@ xyzzy_priv_perf(VRT_CTX, VCL_INT size, VCL_INT rounds)
 	CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
 
 	for (s = 1; s <= size; s++) {
-		p = VRT_priv_task(ctx, (void *)s);
+		p = VRT_priv_task(ctx, (void *)(uintptr_t)s);
 		if (p == NULL) {
 			VRT_fail(ctx, "no priv task - out of ws?");
 			return (-1.0);
@@ -576,7 +576,7 @@ xyzzy_priv_perf(VRT_CTX, VCL_INT size, VCL_INT rounds)
 	t0 = VTIM_mono();
 	for (r = 0; r < rounds; r++) {
 		for (s = 1; s <= size; s++) {
-			p = VRT_priv_task(ctx, (void *)s);
+			p = VRT_priv_task(ctx, (void *)(uintptr_t)s);
 			check += (uintptr_t)p->priv;
 			p->priv = (void *)(uintptr_t)(s * rounds + r);
 		}


More information about the varnish-commit mailing list