[master] 77e0b2c Take a more competent stab a the casts which breaks builds in jenkins.

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 29 08:06:32 CEST 2014


commit 77e0b2c205d1dc7bb7cd91e62bac74fc6f88cbc6
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 29 06:06:09 2014 +0000

    Take a more competent stab a the casts which breaks builds in jenkins.

diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index 8295394..006df7a 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -127,9 +127,9 @@ void VSM_common_ageupdate(struct vsm_sc *sc);
  * Generic power-2 rounding macros
  */
 
-#define PWR2(x)     ((((x)-1)&(x))==0)		/* Is a power of two */
-#define RDN2(x, y)  ((x)&(~((uintmax_t)(y)-1)))	/* PWR2(y) true */
-#define RUP2(x, y)  (((x)+((y)-1))&(~((uintmax_t)(y)-1))) /* PWR2(y) true */
+#define PWR2(x)     ((((x)-1UL)&(x))==0)		/* Is a power of two */
+#define RDN2(x, y)  ((x)&(~((uintptr_t)(y)-1UL)))	/* PWR2(y) true */
+#define RUP2(x, y)  (((x)+((y)-1))&(~((uintptr_t)(y)-1UL))) /* PWR2(y) true */
 
 /*--------------------------------------------------------------------
  * Pointer aligment magic
diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c
index 3bf3353..411fc9a 100644
--- a/bin/varnishd/storage/storage_persistent.c
+++ b/bin/varnishd/storage/storage_persistent.c
@@ -491,7 +491,7 @@ smp_allocx(struct stevedore *st, size_t min_size, size_t max_size,
 	/* Fill the storage structure */
 	memset(ss, 0, sizeof *ss);
 	ss->magic = STORAGE_MAGIC;
-	ss->ptr = (void*)PRNUP(sc, ss + 1);
+	ss->ptr = PRNUP(sc, ss + 1);
 	ss->space = max_size;
 	ss->priv = sc;
 	ss->stevedore = st;



More information about the varnish-commit mailing list