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
fb2a1919
Commit
fb2a1919
authored
Apr 26, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More FlexeLinting
parent
af0c665e
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
11 additions
and
16 deletions
+11
-16
flint.lnt
bin/varnishd/flint.lnt
+0
-1
flint.lnt
bin/varnishlog/flint.lnt
+0
-1
flint.lnt
bin/varnishncsa/flint.lnt
+0
-1
flint.lnt
bin/varnishstat/flint.lnt
+0
-1
flint.lnt
bin/varnishtop/flint.lnt
+0
-1
flint.lnt
flint.lnt
+1
-0
miniobj.h
include/miniobj.h
+3
-2
flint.lnt
lib/libvarnish/flint.lnt
+0
-1
vsl.c
lib/libvarnishapi/vsl.c
+4
-4
vsl_dispatch.c
lib/libvarnishapi/vsl_dispatch.c
+3
-3
flint.lnt
lib/libvcc/flint.lnt
+0
-1
No files found.
bin/varnishd/flint.lnt
View file @
fb2a1919
...
@@ -137,7 +137,6 @@
...
@@ -137,7 +137,6 @@
// Review all below this line ///////////////////////////////////////////////
// Review all below this line ///////////////////////////////////////////////
-e713 // 42 Loss of precision (___) (___ to ___)
-e713 // 42 Loss of precision (___) (___ to ___)
-e574 // 48 Signed-unsigned mix with relational
-e840 // Use of nul character in a string literal (see: vcc_if.c)
-e840 // Use of nul character in a string literal (see: vcc_if.c)
-e663 // Suspicious array to pointer conversion
-e663 // Suspicious array to pointer conversion
-e778 // Constant expression evaluates to 0 in operation '___'
-e778 // Constant expression evaluates to 0 in operation '___'
...
...
bin/varnishlog/flint.lnt
View file @
fb2a1919
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
-e788 // enum constant '___' not used within defaulted switch
-e788 // enum constant '___' not used within defaulted switch
-e641 // Converting enum '___' to '___'
-e641 // Converting enum '___' to '___'
bin/varnishncsa/flint.lnt
View file @
fb2a1919
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
-e767 // Macro redef (system queue.h vs ours )
-e767 // Macro redef (system queue.h vs ours )
-e574 // Signed-unsigned mix with relational
-e712 // Loss of precision (assignment) (long long to
-e712 // Loss of precision (assignment) (long long to
-e747 // Significant prototype coercion (arg. no. 2) long
-e747 // Significant prototype coercion (arg. no. 2) long
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e713 // Loss of precision (assignment) (unsigned long long to long long)
...
...
bin/varnishstat/flint.lnt
View file @
fb2a1919
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// Varnishstat specific
// Varnishstat specific
...
...
bin/varnishtop/flint.lnt
View file @
fb2a1919
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// Varnishstat specific
// Varnishstat specific
...
...
flint.lnt
View file @
fb2a1919
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// General stylistic issues
// General stylistic issues
-e574 // Signed-unsigned mix with relational
-e641 // Converting enum '...' to int
-e641 // Converting enum '...' to int
-e716 // while(1) ...
-e716 // while(1) ...
-e726 // Extraneous comma ignored
-e726 // Extraneous comma ignored
...
...
include/miniobj.h
View file @
fb2a1919
...
@@ -75,9 +75,10 @@
...
@@ -75,9 +75,10 @@
#define REPLACE(ptr, val) \
#define REPLACE(ptr, val) \
do { \
do { \
const char *_vreplace = (val); \
free(ptr); \
free(ptr); \
if (
(val) != NULL) {
\
if (
_vreplace != NULL) {
\
ptr = strdup(
val);
\
ptr = strdup(
_vreplace);
\
AN((ptr)); \
AN((ptr)); \
} else { \
} else { \
ptr = NULL; \
ptr = NULL; \
...
...
lib/libvarnish/flint.lnt
View file @
fb2a1919
...
@@ -60,7 +60,6 @@
...
@@ -60,7 +60,6 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
-e712 // Loss of precision (assignment) (long long to
-e712 // Loss of precision (assignment) (long long to
-e747 // Significant prototype coercion (arg. no. 2) long
-e747 // Significant prototype coercion (arg. no. 2) long
...
...
lib/libvarnishapi/vsl.c
View file @
fb2a1919
...
@@ -172,7 +172,7 @@ vsl_match_IX(struct VSL_data *vsl, const vslf_list *list,
...
@@ -172,7 +172,7 @@ vsl_match_IX(struct VSL_data *vsl, const vslf_list *list,
const
struct
vslf
*
vslf
;
const
struct
vslf
*
vslf
;
(
void
)
vsl
;
(
void
)
vsl
;
tag
=
VSL_TAG
(
c
->
rec
.
ptr
);
tag
=
(
enum
VSL_tag_e
)
VSL_TAG
(
c
->
rec
.
ptr
);
cdata
=
VSL_CDATA
(
c
->
rec
.
ptr
);
cdata
=
VSL_CDATA
(
c
->
rec
.
ptr
);
len
=
VSL_LEN
(
c
->
rec
.
ptr
);
len
=
VSL_LEN
(
c
->
rec
.
ptr
);
...
@@ -194,7 +194,7 @@ VSL_Match(struct VSL_data *vsl, const struct VSL_cursor *c)
...
@@ -194,7 +194,7 @@ VSL_Match(struct VSL_data *vsl, const struct VSL_cursor *c)
CHECK_OBJ_NOTNULL
(
vsl
,
VSL_MAGIC
);
CHECK_OBJ_NOTNULL
(
vsl
,
VSL_MAGIC
);
if
(
c
==
NULL
||
c
->
rec
.
ptr
==
NULL
)
if
(
c
==
NULL
||
c
->
rec
.
ptr
==
NULL
)
return
(
0
);
return
(
0
);
tag
=
VSL_TAG
(
c
->
rec
.
ptr
);
tag
=
(
enum
VSL_tag_e
)
VSL_TAG
(
c
->
rec
.
ptr
);
if
(
tag
<=
SLT__Bogus
||
tag
>=
SLT__Reserved
)
if
(
tag
<=
SLT__Bogus
||
tag
>=
SLT__Reserved
)
return
(
0
);
return
(
0
);
if
(
vsl
->
c_opt
&&
!
VSL_CLIENT
(
c
->
rec
.
ptr
))
if
(
vsl
->
c_opt
&&
!
VSL_CLIENT
(
c
->
rec
.
ptr
))
...
@@ -245,7 +245,7 @@ VSL_Print(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
...
@@ -245,7 +245,7 @@ VSL_Print(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
return
(
0
);
return
(
0
);
if
(
fo
==
NULL
)
if
(
fo
==
NULL
)
fo
=
stdout
;
fo
=
stdout
;
tag
=
VSL_TAG
(
c
->
rec
.
ptr
);
tag
=
(
enum
VSL_tag_e
)
VSL_TAG
(
c
->
rec
.
ptr
);
vxid
=
VSL_ID
(
c
->
rec
.
ptr
);
vxid
=
VSL_ID
(
c
->
rec
.
ptr
);
len
=
VSL_LEN
(
c
->
rec
.
ptr
);
len
=
VSL_LEN
(
c
->
rec
.
ptr
);
type
=
VSL_CLIENT
(
c
->
rec
.
ptr
)
?
'c'
:
VSL_BACKEND
(
c
->
rec
.
ptr
)
?
type
=
VSL_CLIENT
(
c
->
rec
.
ptr
)
?
'c'
:
VSL_BACKEND
(
c
->
rec
.
ptr
)
?
...
@@ -283,7 +283,7 @@ VSL_PrintTerse(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
...
@@ -283,7 +283,7 @@ VSL_PrintTerse(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
return
(
0
);
return
(
0
);
if
(
fo
==
NULL
)
if
(
fo
==
NULL
)
fo
=
stdout
;
fo
=
stdout
;
tag
=
VSL_TAG
(
c
->
rec
.
ptr
);
tag
=
(
enum
VSL_tag_e
)
VSL_TAG
(
c
->
rec
.
ptr
);
len
=
VSL_LEN
(
c
->
rec
.
ptr
);
len
=
VSL_LEN
(
c
->
rec
.
ptr
);
data
=
VSL_CDATA
(
c
->
rec
.
ptr
);
data
=
VSL_CDATA
(
c
->
rec
.
ptr
);
...
...
lib/libvarnishapi/vsl_dispatch.c
View file @
fb2a1919
...
@@ -859,7 +859,7 @@ vtx_scan(struct VSLQ *vslq, struct vtx *vtx)
...
@@ -859,7 +859,7 @@ vtx_scan(struct VSLQ *vslq, struct vtx *vtx)
continue
;
continue
;
}
}
tag
=
VSL_TAG
(
ptr
);
tag
=
(
enum
VSL_tag_e
)
VSL_TAG
(
ptr
);
assert
(
tag
!=
SLT__Batch
);
assert
(
tag
!=
SLT__Batch
);
switch
(
tag
)
{
switch
(
tag
)
{
...
@@ -1247,14 +1247,14 @@ vslq_next(struct VSLQ *vslq)
...
@@ -1247,14 +1247,14 @@ vslq_next(struct VSLQ *vslq)
if
(
i
!=
1
)
if
(
i
!=
1
)
return
(
i
);
return
(
i
);
tag
=
VSL_TAG
(
c
->
rec
.
ptr
);
tag
=
(
enum
VSL_tag_e
)
VSL_TAG
(
c
->
rec
.
ptr
);
if
(
tag
==
SLT__Batch
)
{
if
(
tag
==
SLT__Batch
)
{
vxid
=
VSL_BATCHID
(
c
->
rec
.
ptr
);
vxid
=
VSL_BATCHID
(
c
->
rec
.
ptr
);
len
=
VSL_END
(
c
->
rec
.
ptr
,
VSL_BATCHLEN
(
c
->
rec
.
ptr
))
-
len
=
VSL_END
(
c
->
rec
.
ptr
,
VSL_BATCHLEN
(
c
->
rec
.
ptr
))
-
c
->
rec
.
ptr
;
c
->
rec
.
ptr
;
if
(
len
==
0
)
if
(
len
==
0
)
return
(
i
);
return
(
i
);
tag
=
VSL_TAG
(
VSL_NEXT
(
c
->
rec
.
ptr
));
tag
=
(
enum
VSL_tag_e
)
VSL_TAG
(
VSL_NEXT
(
c
->
rec
.
ptr
));
}
else
{
}
else
{
vxid
=
VSL_ID
(
c
->
rec
.
ptr
);
vxid
=
VSL_ID
(
c
->
rec
.
ptr
);
len
=
VSL_NEXT
(
c
->
rec
.
ptr
)
-
c
->
rec
.
ptr
;
len
=
VSL_NEXT
(
c
->
rec
.
ptr
)
-
c
->
rec
.
ptr
;
...
...
lib/libvcc/flint.lnt
View file @
fb2a1919
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
-e506 // Constant value boolean
-e506 // Constant value boolean
-e774 // Boolean within 'if' always evaluates to False
-e774 // Boolean within 'if' always evaluates to False
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
-e539 // Did not expect positive indentation
-e539 // Did not expect positive indentation
-e734 // Loss of precision (assignment) (31 bits to 8 bits)
-e734 // Loss of precision (assignment) (31 bits to 8 bits)
-e747 // Significant prototype coercion (arg. no. 2) long
-e747 // Significant prototype coercion (arg. no. 2) long
...
...
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