[master] 6c6f8d1e3 flexelinting

Nils Goroll nils.goroll at uplex.de
Wed Oct 14 10:46:06 UTC 2020


commit 6c6f8d1e34153c7423ad6ea7a73d1d26ce475355
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Oct 14 12:33:36 2020 +0200

    flexelinting

diff --git a/bin/varnishd/cache/cache_fetch_proc.c b/bin/varnishd/cache/cache_fetch_proc.c
index 0b7c69913..079279c30 100644
--- a/bin/varnishd/cache/cache_fetch_proc.c
+++ b/bin/varnishd/cache/cache_fetch_proc.c
@@ -99,7 +99,7 @@ VFP_Extend(const struct vfp_ctx *vc, ssize_t sz, enum vfp_status flg)
 {
 	CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC);
 
-	ObjExtend(vc->wrk, vc->oc, sz, flg == VFP_END);
+	ObjExtend(vc->wrk, vc->oc, sz, flg == VFP_END ? 1 : 0);
 }
 
 /**********************************************************************
diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c
index fdec1bd4c..9a52edf5b 100644
--- a/bin/varnishd/cache/cache_req_body.c
+++ b/bin/varnishd/cache/cache_req_body.c
@@ -124,7 +124,8 @@ vrb_pull(struct req *req, ssize_t maxsize, objiterate_f *func, void *priv)
 				if (r)
 					break;
 			} else {
-				ObjExtend(req->wrk, req->body_oc, l, vfps == VFP_END);
+				ObjExtend(req->wrk, req->body_oc, l,
+				    vfps == VFP_END ? 1 : 0);
 			}
 		}
 
diff --git a/lib/libvarnishapi/vsl_cursor.c b/lib/libvarnishapi/vsl_cursor.c
index a9d83de36..687d618e0 100644
--- a/lib/libvarnishapi/vsl_cursor.c
+++ b/lib/libvarnishapi/vsl_cursor.c
@@ -486,7 +486,7 @@ vsl_cursor_mmap(struct VSL_data *vsl, int fd)
 	if ((st->st_mode & S_IFMT) != S_IFREG)
 		return (MAP_FAILED);
 
-	assert(st->st_size >= sizeof VSL_FILE_ID);
+	assert(st->st_size >= (off_t)(sizeof VSL_FILE_ID));
 	p = mmap(NULL, st->st_size, PROT_READ, MAP_PRIVATE, fd, 0);
 	if (p == MAP_FAILED) {
 		vsl_diag(vsl, "Cannot mmap: %s", strerror(errno));
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index 40ecc13ca..3f7e57b1a 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -174,7 +174,7 @@ static const struct vdp xyzzy_vdp_rot13 = {
  * yet that would cross the API
  */
 
-void * end_marker = &end_marker;
+static void * end_marker = &end_marker;
 
 static int v_matchproto_(vdp_bytes_f)
 xyzzy_pedantic_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,


More information about the varnish-commit mailing list