[4.1] 10c54c3 More FlexeLint polishing
Poul-Henning Kamp
phk at FreeBSD.org
Fri Sep 4 15:54:50 CEST 2015
commit 10c54c3ce8e4e961614f9c1e5667607f41601644
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Jul 10 07:07:58 2015 +0000
More FlexeLint polishing
diff --git a/bin/flint.lnt b/bin/flint.lnt
index ce30d3a..0bc6639 100644
--- a/bin/flint.lnt
+++ b/bin/flint.lnt
@@ -22,9 +22,6 @@
// System library/POSIX related
///////////////////////////////////////////////////////////////////////
-// vararg simulation is imperfect (XXX: why ??)
--emacro((???), va_arg) // 415, 416, 416, 661, 662, 796, 797 ...
-
// Fix strchr() semtics, it can only return NULL if arg2 != 0
-sem(strchr, 1p, type(1), 2n == 0 ? (@p < 1p) : (@p < 1p || @p == 0 ))
diff --git a/bin/varnishd/flint.lnt b/bin/varnishd/flint.lnt
index 70ec5b6..5904b1e 100644
--- a/bin/varnishd/flint.lnt
+++ b/bin/varnishd/flint.lnt
@@ -63,11 +63,9 @@
//-sem (pthread_mutex_lock, thread_lock)
-sem (pthread_mutex_trylock, thread_lock)
-sem (VBE_DropRefLocked, thread_unlock)
--e459 // unlocked access from func-ptr
-e454 // mutex not released (...ReleaseLocked)
-e457 // unprotected access
-e777 // float equality comparison
--e679 // Suspicious Truncation in arithmetic expression combining with pointer
-esym(458, params) // unlocked access
@@ -133,7 +131,6 @@
-emacro(506, isnan, isfinite) // constant value boolean
-emacro(736, isfinite) // loss of precision
--emacro(747, isnan) // significant coersion
-emacro(774, HTTPH) // always false
-emacro(527, ARGV_ERR) // unreachable
@@ -153,12 +150,9 @@
// Review all below this line ///////////////////////////////////////////////
--e732 // 183 Loss of sign (___) (___ to ___)
-e737 // 143 Loss of sign in promotion from ___ to ___
-e713 // 42 Loss of precision (___) (___ to ___)
-e574 // 48 Signed-unsigned mix with relational
--e712 // 96 Loss of precision (___) (___ to ___)
--e747 // 297 Significant prototype coercion (___) ___ to ___
-e840 // Use of nul character in a string literal (see: vcc_if.c)
-e663 // Suspicious array to pointer conversion
-e778 // Constant expression evaluates to 0 in operation '___'
diff --git a/flint.lnt b/flint.lnt
index 9530745..000968a 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -15,11 +15,16 @@
// General stylistic issues
-e726 // Extraneous comma ignored
-e641 // Converting enum '...' to int
--e763 // // Redundant declaration for symbol '...' previously declared
+-e763 // Redundant declaration for symbol '...' previously declared
+
+// +e958 // padding
///////////////////////////////////////////////////////////////////////
-// Ignored return values in system libraries
+// System/Posix/Iso-C library related
+
+-emacro(747, isnan) // significant coersion
+// ignore retval
-esym(534, printf)
-esym(534, fprintf)
-esym(534, sprintf)
@@ -86,3 +91,13 @@
///////////////////////////////////////////////////////////////////////
-esym(785,VSL_tags) // Sparse array
+
+///////////////////////////////////////////////////////////////////////
+// Noise reduction, review periodically
+
+-e459 // unlocked access from func-ptr
+-e679 // Suspicious Truncation in arithmetic expression combining with pointer
+-e712 // Loss of precision (___) (___ to ___)
+-e732 // Loss of sign (___) (___ to ___)
+-e747 // Significant prototype coercion (___) ___ to ___
+
More information about the varnish-commit
mailing list