forked from varnishcache/varnish-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flint.lnt
232 lines (179 loc) · 7.23 KB
/
flint.lnt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/*
* Toplevel control file for FlexeLint
*/
//d__flexelint_v9__=1
+fan
-emacro((835),*) // A zero has been given as ___ argument to operator '___
///////////////////////////////////////////////////////////////////////
// build/config related
-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 '___'
+libh(../../config.h)
-esym(768, vmod_priv) // global struct member '___' (___) not referenced
///////////////////////////////////////////////////////////////////////
// Thread/locking, too many false positives still
-e454 // A thread mutex has been locked but not unlocked___
-e455 // A thread mutex that had not been locked is being unlocked
-e456 // Two execution paths are being combined with different mutex lock states
-e457 // unprotected write access
-e458 // unprotected access
-e459 // unprotected access
///////////////////////////////////////////////////////////////////////
// General stylistic issues
-e663 // Suspicious array to pointer conversion
-e574 // Signed-unsigned mix with relational
-e641 // Converting enum '...' to int
-e716 // while(1) ...
-e726 // Extraneous comma ignored
-e728 // Symbol ... not explicitly initialized
-e737 // Loss of sign in promotion from int to unsigned int
-e763 // Redundant declaration for symbol '...' previously declared
-e717 // do ... while(0);
-e777 // Testing floats for equality
-e785 // Too few initializers for aggregate
-e786 // String concatenation within initializer
-e788 // enum constant '___' not used within defaulted switch
-esym(818, argv) // Pointer parameter '...' could be declared as pointing to const
-e850 // loop variable modified in loop
/*
* va_list's are opaque for a reason, but we pretend to FlexeLint that it
* is just a void*, so it proposes constification, which is not generally OK,
* for instance on register-spilling architectures.
* XXX: Maybe 'ap' is a badly chosen conventional name here...
*/
-esym(818, ap) // Pointer parameter '...' could be declared as pointing to const
-efunc(789, main) // Assigning address of auto variable '...' to static
// +e958 // padding
///////////////////////////////////////////////////////////////////////
// System/Posix/Iso-C library related
-emacro(747, isnan) // significant coercion
// ignore retval
-esym(534, printf)
-esym(534, fprintf)
-esym(534, vfprintf)
-esym(534, sprintf)
-esym(534, memset)
-esym(534, memcpy)
-esym(534, memmove)
-esym(534, strcat)
-esym(534, strcpy)
-esym(534, strncpy)
-esym(534, sleep)
-esym(534, usleep)
///////////////////////////////////////////////////////////////////////
// Vmod/vmodtool.py
-esym(14, vmod_enum_*) // Symbol '___' previously defined (___)
-esym(759, vmod_enum_*) // header declaration for symbol '___' defined at (___)
-esym(765, vmod_enum_*) // external '___' (___) could be made static
///////////////////////////////////////////////////////////////////////
// <vut.h>
-sem(VUT_Error, r_no)
///////////////////////////////////////////////////////////////////////
// <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) // boolean always true
-emacro(731, assert) // boolean arg to eq/non-eq
-emacro(731, xxxassert) // arg to eq/non-eq
-emacro(527, WRONG) // unreachable code
-emacro(774, VALID_OBJ) // boolean always true
///////////////////////////////////////////////////////////////////////
// Places where we use x<<0 for reasons of symmetry
-emacro(835, VCT_SP) // A zero has been given as ___ argument to operator '___'
-emacro(835, VSL_COPT_TAIL) // A zero has been given as ___ argument to operator '___'
-emacro(835, SLT_F_UNUSED) // A zero has been given as ___ argument to operator '___'
-emacro(835, ARGV_COMMENT) // A zero has been given as ___ argument to operator '___'
-emacro(835, F_SEEN_ixIX) // A zero has been given as ___ argument to operator '___'
-emacro(835, VEX_OPT_CASELESS) // A zero has been given as ___ argument to operator '___'
///////////////////////////////////////////////////////////////////////
// <vsb.h>
-esym(759, VSB_*) // header decl could be moved
-esym(765, VSB_*) // extern 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)
///////////////////////////////////////////////////////////////////////
// <vtree.h>
-emacro(801, VRB_*) // goto considered bad
-esym(534, *_VRB_REMOVE) // ignore retval
-esym(534, *_VRB_INSERT) // ignore retval
///////////////////////////////////////////////////////////////////////
// <vqueue.h>
-esym(755, VLIST_*) // Global macro not ref.
-esym(755, VSLIST_*)
-esym(755, VSTAILQ_*)
-esym(755, VTAILQ_*)
// 506 = constant value boolean
-emacro(506, VTAILQ_FOREACH_REVERSE_SAFE)
-emacro(506, VTAILQ_FOREACH_SAFE)
-emacro(506, VSTAILQ_FOREACH_SAFE) // constant value boolean
// 826 = Suspicious pointer-to-pointer conversion (area to o small)
-emacro((826), VTAILQ_LAST)
-emacro((826), VTAILQ_PREV)
-emacro(740, VTAILQ_LAST) // Unusual pointer cast (incompatible indirect types)
-emacro(740, VTAILQ_PREV) // Unusual pointer cast (incompatible indirect types)
-esym(754, "*::vtqh_first") // local struct member '...' not referenced
///////////////////////////////////////////////////////////////////////
// <vdef.h>
-emacro(527, NEEDLESS) // unreachable code
///////////////////////////////////////////////////////////////////////
// <libvarnishapi>
-esym(765, vsl_vbm_bitclr)
-esym(759, vsl_vbm_bitclr)
-esym(765, vsl_vbm_bitset)
-esym(759, vsl_vbm_bitset)
-esym(765, vsm_diag)
-esym(759, vsm_diag)
///////////////////////////////////////////////////////////////////////
// "miniobj.h"
-emacro(774, REPLACE)
// It is ok to default after handling a few select SLT_* tags
-esym(788, VSL_tag_e::SLT_*) // enum constant '...' not used within defaulted switch
-esym(785,VSL_tags) // Sparse array
///////////////////////////////////////////////////////////////////////
// -lcurses
-esym(534, beep)
-esym(534, curs_set)
-esym(534, delwin)
-esym(534, doupdate)
-esym(534, endwin)
-esym(534, initscr)
-esym(534, intrflush)
-esym(534, keypad)
-esym(534, mvprintw)
-esym(534, mvwprintw)
-esym(534, nodelay)
-esym(534, noecho)
-esym(534, nonl)
-esym(534, raw)
-esym(534, waddch)
-esym(534, wattr_off)
-esym(534, wattr_on)
-esym(534, wbkgd)
-esym(534, werase)
-esym(534, wmove)
-esym(534, wnoutrefresh)
-esym(534, wprintw)
-esym(534, wredrawln)
-esym(534, wrefresh)
///////////////////////////////////////////////////////////////////////
// Noise reduction, review periodically
-e459 // unlocked access from func-ptr
-e679 // Suspicious Truncation in arithmetic expression combining with pointer
-e712 // Loss of precision (___) (___ to ___)
-e713 // Loss of precision (___) (___ to ___)
-e732 // Loss of sign (___) (___ to ___)
-e734 // Loss of precision (___) (___ bits to ___ bits)
-e747 // Significant prototype coercion (___) ___ to ___