[master] 95a34ee Minor flexelintery

Poul-Henning Kamp phk at FreeBSD.org
Fri Apr 28 17:04:06 CEST 2017


commit 95a34ee944b2fb6e51d2eecf4179a48539805102
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Apr 28 15:03:45 2017 +0000

    Minor flexelintery

diff --git a/bin/varnishtest/flint.lnt b/bin/varnishtest/flint.lnt
index ad1e024..65c57c0 100644
--- a/bin/varnishtest/flint.lnt
+++ b/bin/varnishtest/flint.lnt
@@ -16,6 +16,8 @@
 -e850	// for loop index variable '___' whose type category is '___' is modified in body of the for loop that began at '___'
 -e443	// for clause irregularity: variable '___' initialized in 1st expression does not match '___' modified in 3rd
 
+-emacro({506,774},FEATURE)
+-emacro({506,774},STRTOU32_CHECK)
 
 -e679	// Suspicious Truncation in arithmetic expression combining with pointer
 
diff --git a/bin/varnishtest/vtc_h2_hpack.c b/bin/varnishtest/vtc_h2_hpack.c
index 447d59a..52f1f1c 100644
--- a/bin/varnishtest/vtc_h2_hpack.c
+++ b/bin/varnishtest/vtc_h2_hpack.c
@@ -40,7 +40,7 @@ struct symbol {
 	uint8_t		size;
 };
 
-static struct symbol coding_table[] = {
+static const struct symbol coding_table[] = {
 #define HPACK(i, v, l) {v, l},
 #include "vtc_h2_enctbl.h"
 #undef HPACK
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index c0271cb..31591ae 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -1269,7 +1269,7 @@ cmd_sendhex(CMD_ARGS)
 	hdr.value.ptr = strdup(v);	\
 	AN(hdr.value.ptr);		\
 	hdr.value.len = strlen(v);	\
-	HPK_EncHdr(iter, &hdr);		\
+	(void)HPK_EncHdr(iter, &hdr);	\
 	free(hdr.key.ptr);		\
 	free(hdr.value.ptr);		\
 }
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index f9de433..e7e778f 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -532,6 +532,8 @@ read_file(const char *fn, int ntest)
 		if (*q != '#')
 			break;
 		q = strchr(q, '\n');
+		if (q == NULL)
+			break;
 	}
 
 	if (q == NULL || *q == '\0') {
@@ -566,6 +568,7 @@ main(int argc, char * const *argv)
 	int ch, i;
 	int ntest = 1;			/* Run tests this many times */
 	uintmax_t bufsiz;
+	const char *p;
 
 	if (getenv("TMPDIR") != NULL)
 		tmppath = strdup(getenv("TMPDIR"));
@@ -579,8 +582,9 @@ main(int argc, char * const *argv)
 
 	params_vsb = VSB_new_auto();
 	AN(params_vsb);
-	if (getenv("VARNISHTEST_DURATION"))
-		vtc_maxdur = atoi(getenv("VARNISHTEST_DURATION"));
+	p = getenv("VARNISHTEST_DURATION");
+	if (p != NULL)
+		vtc_maxdur = atoi(p);
 
 	setbuf(stdout, NULL);
 	setbuf(stderr, NULL);



More information about the varnish-commit mailing list