[master] 7fdf9d884 vai: Address old gcc's complaints

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


commit 7fdf9d8849dc2fa02599d61d681bd59c621d0a50
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Jul 4 20:14:14 2025 +0200

    vai: Address old gcc's complaints

diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c
index 26b8306fb..4a47f5560 100644
--- a/bin/varnishd/storage/storage_simple.c
+++ b/bin/varnishd/storage/storage_simple.c
@@ -354,7 +354,7 @@ lease2st(uint64_t l)
 static inline void
 sml_ai_viov_fill(struct viov *viov, struct storage *st)
 {
-	viov->iov.iov_base = st->ptr;
+	viov->iov.iov_base = TRUST_ME(st->ptr);
 	viov->iov.iov_len = st->len;
 	viov->lease = st2lease(st);
 	VAI_ASSERT_LEASE(viov->lease);
@@ -528,7 +528,7 @@ sml_ai_lease_boc(struct worker *wrk, vai_hdl vhdl, struct vscarab *scarab)
 		AN(l);
 		if (l > av)
 			l = av;
-		viov->iov.iov_base = hdl->st->ptr + hdl->st_off;
+		viov->iov.iov_base = TRUST_ME(hdl->st->ptr + hdl->st_off);
 		viov->iov.iov_len = l;
 		if (hdl->st_off + l == hdl->st->space) {
 			next = VTAILQ_PREV(hdl->st, storagehead, list);


More information about the varnish-commit mailing list