[6.0] fa375cd51 More FlexeLintery

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:53:07 UTC 2018


commit fa375cd51e480ddf9d075e858eae61236a1834ef
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Jun 6 07:48:28 2018 +0000

    More FlexeLintery

diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index 8bdb0651b..ba4b01e6b 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -76,12 +76,12 @@ struct top {
 	double			count;
 };
 
-static float period = 60; /* seconds */
+static int period = 60; /* seconds */
 static unsigned ntop;
 static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
 static int f_flag = 0;
 static unsigned maxfieldlen = 0;
-static char *ident;
+static const char *ident;
 
 static volatile sig_atomic_t end_of_file = 0;
 static volatile sig_atomic_t quit = 0;
@@ -207,7 +207,7 @@ update(int p)
 	int l, len, eof;
 	double t = 0;
 	static time_t last = 0;
-	static unsigned n;
+	static unsigned n = 0;
 	const char *q;
 	time_t now;
 
diff --git a/flint.lnt b/flint.lnt
index 1d2482b90..99dfe625c 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -139,6 +139,8 @@
 // <vtree.h>
 
 -emacro(801, VRB_*)		// goto considered bad
+-esym(534, *_VRB_REMOVE)	// ignore retval
+-esym(534, *_VRB_INSERT)	// ignore retval
 
 ///////////////////////////////////////////////////////////////////////
 // <vqueue.h>
diff --git a/lib/libvarnishapi/vut.c b/lib/libvarnishapi/vut.c
index 1b1eb0194..03cd9f07a 100644
--- a/lib/libvarnishapi/vut.c
+++ b/lib/libvarnishapi/vut.c
@@ -275,7 +275,8 @@ VUT_Setup(struct VUT *vut)
 		VUT_Error(vut, 1, "Only one of -n and -r options may be used");
 
 	/* Create and validate the query expression */
-	vut->vslq = VSLQ_New(vut->vsl, NULL, vut->g_arg, vut->q_arg);
+	vut->vslq = VSLQ_New(vut->vsl, NULL,
+	    (enum VSL_grouping_e)vut->g_arg, vut->q_arg);
 	if (vut->vslq == NULL)
 		VUT_Error(vut, 1, "Query expression error:\n%s",
 		    VSL_Error(vut->vsl));


More information about the varnish-commit mailing list