[master] 70aec05 FlexeLinting mainly related to #includs
Poul-Henning Kamp
phk at FreeBSD.org
Wed Apr 26 13:51:04 CEST 2017
commit 70aec0594f7e60ffc9c6db6f3af42997de279d92
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Apr 26 11:50:29 2017 +0000
FlexeLinting mainly related to #includs
diff --git a/bin/varnishd/flint.lnt b/bin/varnishd/flint.lnt
index 2ab787f..f0667fd 100644
--- a/bin/varnishd/flint.lnt
+++ b/bin/varnishd/flint.lnt
@@ -115,7 +115,6 @@
-e455 // thread lock
-e458 // unprotected read
--e728 // Symbol ... not explicitly initialized
-e716 // while(1) ...
-e717 // do ... while(1) ...
-e785 // Too few initializers for aggregate
diff --git a/bin/varnishhist/flint.lnt b/bin/varnishhist/flint.lnt
index e69de29..78ae771 100644
--- a/bin/varnishhist/flint.lnt
+++ b/bin/varnishhist/flint.lnt
@@ -0,0 +1,2 @@
+-efile(451, "varnishhist_profiles.h")
+-efile(451, "varnishhist_options.h")
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 7feec7d..9d0fc45 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -49,10 +49,8 @@
#include "vdef.h"
#include "vcurses.h"
#include "vapi/vsl.h"
-#include "vapi/vsm.h"
#include "vapi/voptget.h"
#include "vas.h"
-#include "vcs.h"
#include "vut.h"
#include "vtim.h"
@@ -612,7 +610,7 @@ main(int argc, char **argv)
VUT_Setup();
if (pthread_create(&thr, NULL, do_curses, NULL) != 0)
VUT_Error(1, "pthread_create(): %s", strerror(errno));
- VUT.dispatch_f = &accumulate;
+ VUT.dispatch_f = accumulate;
VUT.dispatch_priv = NULL;
VUT.sighup_f = sighup;
VUT_Main();
diff --git a/bin/varnishlog/flint.lnt b/bin/varnishlog/flint.lnt
index c29d6d4..7d06a3e 100644
--- a/bin/varnishlog/flint.lnt
+++ b/bin/varnishlog/flint.lnt
@@ -4,6 +4,8 @@
-e763 // Redundant declaration for symbol '...' previously declared
-e716 // while(1) ...
+-efile(451, "varnishlog_options.h")
+
-e457 // unprotected write access
-e459 // unprotected access
-e458 // unprotected access
diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c
index 6fd36b4..6f8fdb6 100644
--- a/bin/varnishlog/varnishlog.c
+++ b/bin/varnishlog/varnishlog.c
@@ -46,7 +46,6 @@
#include "vas.h"
#include "vdef.h"
#include "vpf.h"
-#include "vsb.h"
#include "vut.h"
#include "miniobj.h"
diff --git a/bin/varnishncsa/flint.lnt b/bin/varnishncsa/flint.lnt
index 462320f..f9fb415 100644
--- a/bin/varnishncsa/flint.lnt
+++ b/bin/varnishncsa/flint.lnt
@@ -1,9 +1,10 @@
+d__attribute__()=
+-efile(451, "varnishncsa_options.h")
+
-e763 // Redundant declaration for symbol '...' previously declared
-e726 // Extraneous comma ignored
--e728 // Symbol ... not explicitly initialized
-e716 // while(1) ...
-e785 // Too few initializers for aggregate
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 364f580..8c4923c 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -59,7 +59,6 @@
#include "vapi/voptget.h"
#include "vas.h"
#include "vdef.h"
-#include "vcs.h"
#include "vsb.h"
#include "vut.h"
#include "vqueue.h"
diff --git a/bin/varnishstat/flint.lnt b/bin/varnishstat/flint.lnt
index 509e13a..eaa89be 100644
--- a/bin/varnishstat/flint.lnt
+++ b/bin/varnishstat/flint.lnt
@@ -1,6 +1,8 @@
+libh mgt_event.h
+-efile(451, varnishstat_options.h)
+
-esym(850, av)
-e712 // 14 Info 712 Loss of precision (___) (___ to ___)
diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 4df6dd2..557f90f 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -1675,7 +1675,11 @@ cmd_http_fatal(CMD_ARGS)
* Same as for the top-level barrier
*/
-static const char PREFACE[24] = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
+static const char PREFACE[24] = {
+ 0x50, 0x52, 0x49, 0x20, 0x2a, 0x20, 0x48, 0x54,
+ 0x54, 0x50, 0x2f, 0x32, 0x2e, 0x30, 0x0d, 0x0a,
+ 0x0d, 0x0a, 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a
+};
/* SECTION: client-server.spec.txpri
*
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index ead77a4..18d9361 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -44,7 +44,6 @@
#include "vtc.h"
#include "vtc_http.h"
-#include "vct.h"
#include "vfil.h"
#include "vgz.h"
#include "vnum.h"
diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index 0c08e02..6af08a1 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -50,9 +50,7 @@
#include "vapi/voptget.h"
#include "vas.h"
#include "vdef.h"
-#include "vcs.h"
#include "vtree.h"
-#include "vsb.h"
#include "vut.h"
#if 0
diff --git a/flint.lnt b/flint.lnt
index c8bdee3..43917a9 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -8,6 +8,9 @@
-efile(451, "tbl/*.h") // No include guard
-efile(537, "tbl/*.h") // Repeated include
+-efile(451, "../../include/vut_options.h") // No include guard
+-efile(451, "../../include/vapi/vapi_options.h") // No include guard
+
-efile(451, ../../config.h) // No include guard
-efile(766, ../../config.h) // Header file '___' not used in module '___'
@@ -17,6 +20,7 @@
// General stylistic issues
-e641 // Converting enum '...' to int
-e726 // Extraneous comma ignored
+-e728 // Symbol ... not explicitly initialized
-e763 // Redundant declaration for symbol '...' previously declared
-e777 // Testing floats for equality
-e786 // String concatenation within initializer
@@ -31,6 +35,8 @@
*/
-esym(818, ap) // Pointer parameter '...' could be declared as pointing to const
+-efunc(789, main) // Assigning address of auto variable '...' to static
+
// +e958 // padding
///////////////////////////////////////////////////////////////////////
diff --git a/lib/libvarnish/flint.lnt b/lib/libvarnish/flint.lnt
index 77a2a2d..2ac9733 100644
--- a/lib/libvarnish/flint.lnt
+++ b/lib/libvarnish/flint.lnt
@@ -27,7 +27,6 @@
-e763 // Redundant declaration for symbol '...' previously declared
-e726 // Extraneous comma ignored
--e728 // Symbol ... not explicitly initialized
-e716 // while(1) ...
-e785 // Too few initializers for aggregate
More information about the varnish-commit
mailing list