Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
cfa22119
Commit
cfa22119
authored
Jul 10, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish flexelint stuff for vmods
parent
d07f3e38
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
57 deletions
+90
-57
flint.lnt
bin/flint.lnt
+0
-50
flint.lnt
bin/varnishd/flint.lnt
+0
-2
flint.lnt
flint.lnt
+62
-1
vmodtool.py
lib/libvcc/vmodtool.py
+8
-4
flint.sh
lib/libvmod_debug/flint.sh
+10
-0
flint.sh
lib/libvmod_std/flint.sh
+10
-0
No files found.
bin/flint.lnt
View file @
cfa22119
...
...
@@ -4,27 +4,6 @@
-printf(2, VSB_printf)
///////////////////////////////////////////////////////////////////////
// Weirdness relating to varnish includes etc.
-header(../../config.h)
+libh ../../config.h
-efile(451, ../../config.h) // No include guard
-efile(451, "tbl/*.h") // No include guard
///////////////////////////////////////////////////////////////////////
// assert() support, common to libvarnish and libvarnishapi
-sem(VAS_Fail, r_no)
-emacro(506, assert) // constant value boolean
-emacro(827, assert) // loop not reachable
-emacro(774, assert) // booelan always true
-emacro(731, assert) // booelan arg to eq/non-eq
-emacro(731, xxxassert) // arg to eq/non-eq
-emacro(527, WRONG) // unreachable code
///////////////////////////////////////////////////////////////////////
// miniobj
...
...
@@ -39,22 +18,6 @@
-emacro(755, VRMB) // glob macro not ref
-emacro(755, VWMB) // glob macro not ref
///////////////////////////////////////////////////////////////////////
// VSB
-esym(759, VSB_*) // header decl could be moved
-esym(765, VSB_*) // exten could be made static
-esym(714, VSB_*) // symb not ref
-sem(VSB_new, @p == (1p ? 1p : malloc(1)))
-sem(VSB_delete, custodial(1))
-esym(534, VSB_cat) // Ignore retval
-esym(534, VSB_bcat)
-esym(534, VSB_putc)
-esym(534, VSB_printf)
-esym(534, VSB_vprintf)
-esym(534, VSB_putc)
///////////////////////////////////////////////////////////////////////
// System library/POSIX related
///////////////////////////////////////////////////////////////////////
...
...
@@ -65,19 +28,6 @@
// Fix strchr() semtics, it can only return NULL if arg2 != 0
-sem(strchr, 1p, type(1), 2n == 0 ? (@p < 1p) : (@p < 1p || @p == 0 ))
-esym(534, printf) // Ignore retval
-esym(534, fprintf)
-esym(534, sprintf)
-esym(534, memset)
-esym(534, memcpy)
-esym(534, memmove)
-esym(534, strcat)
-esym(534, strcpy)
-esym(534, strlcpy)
-esym(534, strncpy)
+typename(844)
-etype(844, struct pthread *)
-sem(pthread_create, custodial(4))
...
...
bin/varnishd/flint.lnt
View file @
cfa22119
...
...
@@ -118,7 +118,6 @@
-e455 // thread lock
-e458 // unprotected read
-e763 // Redundant declaration for symbol '...' previously declared
-e728 // Symbol ... not explicitly initialized
-e716 // while(1) ...
-e785 // Too few initializers for aggregate
...
...
@@ -149,7 +148,6 @@
// cache_vcl.c
-esym(528, vcl_call_method) // Not referenced
-esym(528, vcl_handlingname) // Not referenced
-e641 // Converting enum 'cli_status_e' to int
-e441 // for clause irregularity: loop variable '___' not found in 2nd for expression
...
...
flint.lnt
View file @
cfa22119
...
...
@@ -2,8 +2,66 @@
* Toplevel control file for FlexeLint
*/
///////////////////////////////////////////////////////////////////////
// build/config related
-efile(451, "tbl/*.h") // No include guard
-esym(785,VSL_tags) // Sparse array
-efile(451, ../../config.h) // No include guard
-header(../../config.h)
+libh(../../config.h)
///////////////////////////////////////////////////////////////////////
// General stylistic issues
-e726 // Extraneous comma ignored
-e641 // Converting enum '...' to int
-e763 // // Redundant declaration for symbol '...' previously declared
///////////////////////////////////////////////////////////////////////
// Ignored return values in system libraries
-esym(534, printf)
-esym(534, fprintf)
-esym(534, sprintf)
-esym(534, memset)
-esym(534, memcpy)
-esym(534, memmove)
-esym(534, strcat)
-esym(534, strcpy)
-esym(534, strlcpy)
-esym(534, strncpy)
///////////////////////////////////////////////////////////////////////
// <vas.h>
-sem(VAS_Fail, r_no) // does not return
-emacro(506, assert) // constant value boolean
-emacro(827, assert) // loop not reachable
-emacro(774, assert) // booelan always true
-emacro(731, assert) // booelan arg to eq/non-eq
-emacro(731, xxxassert) // arg to eq/non-eq
-emacro(527, WRONG) // unreachable code
///////////////////////////////////////////////////////////////////////
// <vsb.h>
-esym(759, VSB_*) // header decl could be moved
-esym(765, VSB_*) // exten could be made static
-esym(714, VSB_*) // symb not ref
-sem(VSB_new, @p == (1p ? 1p : malloc(1)))
-sem(VSB_delete, custodial(1))
// ignore retval
-esym(534, VSB_cat)
-esym(534, VSB_bcat)
-esym(534, VSB_putc)
-esym(534, VSB_printf)
-esym(534, VSB_vprintf)
-esym(534, VSB_putc)
///////////////////////////////////////////////////////////////////////
// <vqueue.h>
...
...
@@ -25,3 +83,6 @@
-emacro(740, VTAILQ_LAST) // Unusual pointer cast (incompatible indirect types)
-emacro(740, VTAILQ_PREV) // Unusual pointer cast (incompatible indirect types)
///////////////////////////////////////////////////////////////////////
-esym(785,VSL_tags) // Sparse array
lib/libvcc/vmodtool.py
View file @
cfa22119
...
...
@@ -217,6 +217,7 @@ class Vmod(object):
vfn
=
'Vmod_
%
s_Func'
%
self
.
nam
fo
.
write
(
"/*lint -esym(754,
%
s::*) */
\n
"
%
vfn
)
fo
.
write
(
"
\n
static const struct
%
s Vmod_Func ="
%
vfn
)
fo
.
write
(
self
.
c_initializer
())
fo
.
write
(
"
\n
"
)
...
...
@@ -235,7 +236,7 @@ class Vmod(object):
fo
.
write
(
"
\n
"
)
nm
=
"Vmod_"
+
self
.
nam
+
"_Data"
fo
.
write
(
"
extern const struct vmod_data "
+
nm
+
";
\n\n
"
)
fo
.
write
(
"
/*lint -esym(759,
%
s) */
\n
"
%
nm
)
fo
.
write
(
"const struct vmod_data "
+
nm
+
" = {
\n
"
)
fo
.
write
(
"
\t
.vrt_major = VRT_MAJOR_VERSION,
\n
"
);
fo
.
write
(
"
\t
.vrt_minor = VRT_MINOR_VERSION,
\n
"
);
...
...
@@ -288,7 +289,8 @@ class Vmod(object):
return
s
def
c_strspec
(
self
):
s
=
"static const char * const Vmod_Spec[] = {
\n
"
s
=
"/*lint -save -e786 -e840 */
\n
"
s
+=
"static const char * const Vmod_Spec[] = {
\n
"
for
o
in
self
.
objs
:
s
+=
o
.
c_strspec
(
self
.
nam
)
+
",
\n\n
"
...
...
@@ -304,6 +306,7 @@ class Vmod(object):
s
+=
"
\t
0
\n
"
s
+=
"};
\n
"
s
+=
"/*lint -restore */
\n
"
return
s
def
doc
(
self
,
l
):
...
...
@@ -898,8 +901,9 @@ def runmain(inputvcc, outputname="vcc_if"):
write_c_file_warning
(
fc
)
write_c_file_warning
(
fh
)
fh
.
write
(
'struct vmod_priv;
\n
'
)
fh
.
write
(
"
\n
"
)
fh
.
write
(
'struct vmod_priv;
\n\n
'
)
fh
.
write
(
'extern const struct vmod_data Vmod_
%
s_Data;
\n\n
'
%
vx
[
0
]
.
nam
)
vx
[
0
]
.
c_proto
(
fh
)
...
...
lib/libvmod_debug/flint.sh
0 → 100755
View file @
cfa22119
#!/bin/sh
flexelint
\
-u
\
../../flint.lnt
\
-I
.
\
-I
../..
\
-I
../../include
\
-I
../../bin/varnishd
\
*
.c
lib/libvmod_std/flint.sh
0 → 100755
View file @
cfa22119
#!/bin/sh
flexelint
\
-u
\
../../flint.lnt
\
-I
.
\
-I
../..
\
-I
../../include
\
-I
../../bin/varnishd
\
*
.c
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment