[master] 84af74d Handle a few high-volume FlexeLint complaints

Poul-Henning Kamp phk at FreeBSD.org
Mon Apr 24 22:55:05 CEST 2017


commit 84af74d1cae0202dc27a145bf25cc1c50b585417
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Apr 24 20:53:47 2017 +0000

    Handle a few high-volume FlexeLint complaints

diff --git a/bin/flint.lnt b/bin/flint.lnt
index 0c9412c..d5f3dc3 100644
--- a/bin/flint.lnt
+++ b/bin/flint.lnt
@@ -37,7 +37,6 @@
 
 -emacro(702, WEXITSTATUS)	// signed shift right
 
--e786	// String concatenation within initializer
 -e726	// Extraneous comma ignored
 
 -e825	// control flows into case/default without -fallthrough comment
diff --git a/bin/varnishd/vclflint.lnt b/bin/varnishd/vclflint.lnt
index 747d87b..74ba97c 100644
--- a/bin/varnishd/vclflint.lnt
+++ b/bin/varnishd/vclflint.lnt
@@ -17,9 +17,6 @@
 
 			// Harmless
 
--e786			// String concatenation within initializer
-			// Harmless
-
 -e752			// local declarator [...] not referenced
 -e754			// local structure member [...] not referenced
 -e526			// Symbol [...] not defined
diff --git a/bin/varnishncsa/flint.lnt b/bin/varnishncsa/flint.lnt
index 5faddb8..462320f 100644
--- a/bin/varnishncsa/flint.lnt
+++ b/bin/varnishncsa/flint.lnt
@@ -6,7 +6,6 @@
 -e728	// Symbol ... not explicitly initialized
 -e716	// while(1) ...
 -e785	// Too few initializers for aggregate
--e786	// String concatenation within initializer
 
 // cache_vcl.c
 -e641	// Converting enum 'cli_status_e' to int
diff --git a/bin/varnishtest/flint.lnt b/bin/varnishtest/flint.lnt
index 1ef8431..9686e5f 100644
--- a/bin/varnishtest/flint.lnt
+++ b/bin/varnishtest/flint.lnt
@@ -31,7 +31,6 @@
 -e713	// Loss of precision (assignment) (unsigned long long to long long)
 -e574	// Signed-unsigned mix with relational
 -e835	//  A zero has been given as ___ argument to operator '___'  (<<)
--e786	// String concatenation within initializer
 -e788	// enum value not used in defaulted switch
 
 -efile(451, vmods.h)
diff --git a/flint.lnt b/flint.lnt
index 4a52501..0876042 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -18,6 +18,7 @@
 -e726		// Extraneous comma ignored
 -e641		// Converting enum '...' to int
 -e763		// Redundant declaration for symbol '...' previously declared
+-e786		// String concatenation within initializer
 
 // +e958		// padding
 
@@ -99,6 +100,8 @@
 
 ///////////////////////////////////////////////////////////////////////
 
+// It is ok to default after handling a few select SLT_* tags
+-esym(788, VSL_tag_e::SLT_*)	//  enum constant '...' not used within defaulted switch
 
 -esym(785,VSL_tags)				// Sparse array
 
diff --git a/include/tbl/vsl_tags_http.h b/include/tbl/vsl_tags_http.h
index 393dbe5..e0d1802 100644
--- a/include/tbl/vsl_tags_http.h
+++ b/include/tbl/vsl_tags_http.h
@@ -43,7 +43,7 @@
  *
  */
 
-/*lint -save -e525 -e539 */
+/*lint -save -e525 -e539 -e835 */
 
 SLTH(Method,	HTTP_HDR_METHOD,	1, 0, "method",
 	"The HTTP request method used.\n\n"
diff --git a/lib/libvarnish/flint.lnt b/lib/libvarnish/flint.lnt
index f049cc6..f5e545e 100644
--- a/lib/libvarnish/flint.lnt
+++ b/lib/libvarnish/flint.lnt
@@ -26,7 +26,6 @@
 -e728	// Symbol ... not explicitly initialized
 -e716	// while(1) ...
 -e785	// Too few initializers for aggregate
--e786	// String concatenation within initializer
 
 -esym(534, sprintf)	// Ignoring return value of function
 -esym(534, asprintf)	// Ignoring return value of function
diff --git a/lib/libvcc/flint.lnt b/lib/libvcc/flint.lnt
index e264dab..f0b8f65 100644
--- a/lib/libvcc/flint.lnt
+++ b/lib/libvcc/flint.lnt
@@ -27,7 +27,6 @@
 -esym(534, memset)	// Ignoring return value of function
 -e788			// enum constant 'HND_Unclass' not used within defaulted switch
 -e716			// while(1) ...
--e786			// String concatenation within initializer
 -e732			// Loss of sign (arg. no. 2) (int to unsigned int)
 
 



More information about the varnish-commit mailing list