[master] 1c7db798e cache_gzip: Address old gcc's complaints

Nils Goroll nils.goroll at uplex.de
Fri Jul 4 17:46:05 UTC 2025


commit 1c7db798e71ff844650eb740dd371c47d4ba1d8d
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Jul 4 19:44:47 2025 +0200

    cache_gzip: Address old gcc's complaints
    
    cache/cache_gzip.c:264:17: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign]
    cache/cache_gzip.c:266:18: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign]
    cache/cache_gzip.c:282:16: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign]

diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index ccb44d32d..c020fb8bd 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -311,6 +311,9 @@ ved_vdp_esi_fini(struct vdp_ctx *vdc, void **priv)
 	return (0);
 }
 
+static void v_matchproto_(vdpio_fini_f)
+
+
 static int v_matchproto_(vdp_bytes_f)
 ved_vdp_esi_bytes(struct vdp_ctx *vdc, enum vdp_action act, void **priv,
     const void *ptr, ssize_t len)
@@ -485,6 +488,13 @@ const struct vdp VDP_esi = {
 	.init =		ved_vdp_esi_init,
 	.bytes =	ved_vdp_esi_bytes,
 	.fini =		ved_vdp_esi_fini,
+
+#ifdef LATER
+	.io_init =	ved_vdpio_esi_init,
+#endif
+	.io_upgrade =	ved_vdpio_esi_upgrade,
+	.io_lease =	ved_vdpio_esi_lease,
+	.io_fini =	ved_vdpio_esi_fini,
 };
 
 /*
diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c
index 5d303b64c..e7fab9fac 100644
--- a/bin/varnishd/cache/cache_gzip.c
+++ b/bin/varnishd/cache/cache_gzip.c
@@ -261,9 +261,9 @@ vgz_iovec_update(struct vgz *vg, const struct iovec *in, const struct iovec *buf
 {
 	/* in: either fully consumed or the same */
 	assert(vg->vz.avail_in == 0 || vg->vz.next_in == TRUST_ME(in->iov_base));
-	vg->vz.next_in = in->iov_base;
+	vg->vz.next_in = TRUST_ME(in->iov_base);
 	vg->vz.avail_in = in->iov_len;
-	vg->vz.next_out = buf->iov_base;
+	vg->vz.next_out = TRUST_ME(buf->iov_base);
 	vg->vz.avail_out = buf->iov_len;
 }
 
@@ -279,7 +279,7 @@ vgz_gunzip_iovec(struct vgz *vg, struct iovec *in, struct iovec *buf, struct iov
 	i = inflate(&vg->vz, 0);
 	if (i == Z_OK || i == Z_STREAM_END) {
 		iovec_collect(buf, out, pdiff(buf->iov_base, vg->vz.next_out));
-		in->iov_base = vg->vz.next_in;
+		in->iov_base = TRUST_ME(vg->vz.next_in);
 		in->iov_len = vg->vz.avail_in;
 	}
 	vg->last_i = i;


More information about the varnish-commit mailing list