[master] 5d54f8d7a vai: More adjustments for 32 bit

Nils Goroll nils.goroll at uplex.de
Fri Jul 4 18:50:05 UTC 2025


commit 5d54f8d7a56c0647b35dfe6146303af36e4b127e
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Jul 4 20:12:04 2025 +0200

    vai: More adjustments for 32 bit
    
    Truncate the uint64_t interpreted as a pointer first, then cast to an actual
    pointer.
    
    So yes, 32bit still keeps us real...

diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c
index 5bd92b5c8..26b8306fb 100644
--- a/bin/varnishd/storage/storage_simple.c
+++ b/bin/varnishd/storage/storage_simple.c
@@ -348,7 +348,7 @@ lease2st(uint64_t l)
 	if (sizeof(void *) < 8) //lint !e506 !e774
 		l >>= 1;
 
-	return ((void *)l);
+	return ((void *)(uintptr_t)l);
 }
 
 static inline void


More information about the varnish-commit mailing list