[master] b79d508 flexelint silencing
Nils Goroll
nils.goroll at uplex.de
Thu Jun 16 16:21:09 CEST 2016
commit b79d5086404164ba7dc4203dda56b0c84e4f43ec
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Jun 16 14:44:37 2016 +0200
flexelint silencing
- tables get included multiple times
- we use do ... while(1) all over the place
- dont always include config.h for flint, source files need to include it
so we want to see warnings if we missed to include it
- tell flexelint where config.h is ok not to be used (sources with
no actual code unless a feature is HAVE_ defined)
diff --git a/bin/varnishd/flint.lnt b/bin/varnishd/flint.lnt
index 190e4e1..53a15dd 100644
--- a/bin/varnishd/flint.lnt
+++ b/bin/varnishd/flint.lnt
@@ -118,6 +118,7 @@
-e458 // unprotected read
-e728 // Symbol ... not explicitly initialized
-e716 // while(1) ...
+-e717 // do ... while(1) ...
-e785 // Too few initializers for aggregate
-e850 // for loop index variable '___' whose type category is '___'
// is modified in body of the for loop that began at '___'
diff --git a/bin/varnishd/mgt/mgt_jail_solaris.c b/bin/varnishd/mgt/mgt_jail_solaris.c
index 2dd9322..1723e3e 100644
--- a/bin/varnishd/mgt/mgt_jail_solaris.c
+++ b/bin/varnishd/mgt/mgt_jail_solaris.c
@@ -202,6 +202,7 @@
*
*/
+//lint -e{766}
#include "config.h"
#ifdef HAVE_SETPPRIV
diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c
index 4a1442f..eff2a6f 100644
--- a/bin/varnishd/storage/storage_umem.c
+++ b/bin/varnishd/storage/storage_umem.c
@@ -29,6 +29,7 @@
* Storage method based on umem_alloc(3MALLOC)
*/
+//lint -e{766}
#include "config.h"
#ifdef HAVE_LIBUMEM
diff --git a/bin/varnishd/waiter/cache_waiter_epoll.c b/bin/varnishd/waiter/cache_waiter_epoll.c
index f50ae46..3c2b42c 100644
--- a/bin/varnishd/waiter/cache_waiter_epoll.c
+++ b/bin/varnishd/waiter/cache_waiter_epoll.c
@@ -31,6 +31,7 @@
* write the session pointer to a pipe which the event engine monitors.
*/
+//lint -e{766}
#include "config.h"
#if defined(HAVE_EPOLL_CTL)
diff --git a/bin/varnishd/waiter/cache_waiter_kqueue.c b/bin/varnishd/waiter/cache_waiter_kqueue.c
index 02d7adc..e1c7642 100644
--- a/bin/varnishd/waiter/cache_waiter_kqueue.c
+++ b/bin/varnishd/waiter/cache_waiter_kqueue.c
@@ -28,6 +28,7 @@
*
*/
+//lint -e{766}
#include "config.h"
#if defined(HAVE_KQUEUE)
diff --git a/bin/varnishd/waiter/cache_waiter_ports.c b/bin/varnishd/waiter/cache_waiter_ports.c
index 87e4fc8..3b4f59c 100644
--- a/bin/varnishd/waiter/cache_waiter_ports.c
+++ b/bin/varnishd/waiter/cache_waiter_ports.c
@@ -61,6 +61,7 @@
*
*/
+//lint -e{766}
#include "config.h"
#if defined(HAVE_PORT_CREATE)
diff --git a/flint.lnt b/flint.lnt
index 1dcb478..05567ce 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -6,9 +6,9 @@
// build/config related
-efile(451, "tbl/*.h") // No include guard
+-efile(537, "tbl/*.h") // Repeated include
-efile(451, ../../config.h) // No include guard
--header(../../config.h)
+libh(../../config.h)
///////////////////////////////////////////////////////////////////////
diff --git a/lib/libvarnishcompat/daemon.c b/lib/libvarnishcompat/daemon.c
index 6b3fbb1..3ab6b7d 100644
--- a/lib/libvarnishcompat/daemon.c
+++ b/lib/libvarnishcompat/daemon.c
@@ -29,6 +29,7 @@
* $FreeBSD: src/lib/libc/gen/daemon.c,v 1.8 2007/01/09 00:27:53 imp Exp $
*/
+//lint -e{766}
#include "config.h"
#ifndef HAVE_DAEMON
diff --git a/lib/libvarnishcompat/execinfo.c b/lib/libvarnishcompat/execinfo.c
index a9b4471..17321b7 100644
--- a/lib/libvarnishcompat/execinfo.c
+++ b/lib/libvarnishcompat/execinfo.c
@@ -24,6 +24,7 @@
* SUCH DAMAGE.
*/
+//lint -e{766}
#include "config.h"
#ifndef HAVE_BACKTRACE
More information about the varnish-commit
mailing list