[master] a953639dc Flexelinting

Poul-Henning Kamp phk at FreeBSD.org
Mon Feb 27 13:01:06 UTC 2023


commit a953639dc0a2b9a5897cdbf8024b25eb864b8ad8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Feb 27 13:00:47 2023 +0000

    Flexelinting

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 4b79ebc1b..4c646d337 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -496,7 +496,7 @@ http_rxchar(struct http *hp, int n, int eof)
 		pfd[0].fd = hp->sess->fd;
 		pfd[0].events = POLLIN;
 		pfd[0].revents = 0;
-		i = poll(pfd, 1, hp->timeout * 1000);
+		i = poll(pfd, 1, (int)(hp->timeout * 1000));
 		if (i < 0 && errno == EINTR)
 			continue;
 		if (i == 0) {
@@ -1500,7 +1500,7 @@ cmd_http_expect_close(CMD_ARGS)
 		fds[0].fd = hp->sess->fd;
 		fds[0].events = POLLIN;
 		fds[0].revents = 0;
-		i = poll(fds, 1, hp->timeout * 1000);
+		i = poll(fds, 1, (int)(hp->timeout * 1000));
 		if (i < 0 && errno == EINTR)
 			continue;
 		if (i == 0)
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index b70944bda..42410e45f 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -181,7 +181,7 @@ get_bytes(const struct http *hp, char *buf, int n)
 		pfd[0].fd = hp->sess->fd;
 		pfd[0].events = POLLIN;
 		pfd[0].revents = 0;
-		i = poll(pfd, 1, hp->timeout * 1000);
+		i = poll(pfd, 1, (int)(hp->timeout * 1000));
 		if (i < 0 && errno == EINTR)
 			continue;
 		if (i == 0)
@@ -2450,7 +2450,7 @@ cmd_rxsettings(CMD_ARGS)
 	CAST_OBJ_NOTNULL(f, s->frame, FRAME_MAGIC);
 	CHKFRAME(f->type, TYPE_SETTINGS, 0, *av);
 	if (! isnan(f->md.settings[SETTINGS_INITIAL_WINDOW_SIZE])) {
-		val = f->md.settings[SETTINGS_INITIAL_WINDOW_SIZE];
+		val = (uint32_t)f->md.settings[SETTINGS_INITIAL_WINDOW_SIZE];
 		VTAILQ_FOREACH(s2, &hp->streams, list)
 			s2->win_peer += (val - hp->h2_win_peer->init);
 		hp->h2_win_peer->init = val;
diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 12554b853..f763fcce7 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -472,7 +472,7 @@ varnish_launch(struct varnish *v)
 	fd[1].events = POLLIN;
 	fd[2].fd = v->fds[2];
 	fd[2].events = POLLIN;
-	i = poll(fd, 2, vtc_maxdur * 1000 / 3);
+	i = poll(fd, 2, (int)(vtc_maxdur * 1000 / 3));
 	vtc_log(v->vl, 4, "CLIPOLL %d 0x%x 0x%x 0x%x",
 	    i, fd[0].revents, fd[1].revents, fd[2].revents);
 	if (i == 0)


More information about the varnish-commit mailing list