-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfaq-new.html
More file actions
415 lines (403 loc) · 17.7 KB
/
faq-new.html
File metadata and controls
415 lines (403 loc) · 17.7 KB
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://www.splint.org/splint.css" title="style1" />
<title>Splint FAQ</title>
</head>
<body>
<!--#include virtual="header.html"-->
<h1>Frequently Asked Questions</h1>
<h3>Index</h3>
<ol>
<h4><a href="#genquest">General Questions</a></h4>
<blockquote>
<li><a href="#quest1">What is the difference between Splint and LCLint?</a><br />
</li>
<li><a href="#quest2">What is the Splint logo?<br />
</a></li>
<li><a href="#quest3">Can I include Splint in my software distribution?<br />
</a></li>
<li><a href="#quest4">Can we use your software in our company? (We are not a GNU
organization.)<br />
</a></li>
<li><a href="#quest9">Which compilers does Splint support?<br />
</a></li>
<li><a href="#quest5">Does Splint handle C++?<br />
</a></li>
</blockquote>
<h4><a href="#install">Installation</a></h4>
<blockquote>
<li><a href="#quest6">I downloaded the Splint .tgz file but can't figure out how to
extract it. There is no 'z' option on the tar on my system.<br />
</a></li>
<li><a href="#quest7">I want to use Splint in win2000. How do I do that?<br />
</a></li>
<li><a href="#quest8">I have installed Splint for Windows 2000. Where should I put
the ".splintrc" file?<br />
</a></li>
<li><a href="#quest17">When I build Splint I get the following errors.... Should I
be worried?<br />
</a></li>
<li><a href="#quest18">I just installed Splint on a new machine. I get a bunch of
errors during building when the test suite is run. When I look through the results,
it seems like Splint is not reporting any errors in the code it analyzes. What is
going on?<br />
</a></li>
</blockquote>
<h4><a href="#usage">Usage</a></h4>
<blockquote>
<li><a href="#quest15">Why am I getting so many parse errors?</a></li>
<li><a href="#quest16">Are all splint warnings genuine errors?</a></li>
<li><a href="#quest10">How does Splint handle const?<br />
</a></li>
<li><a href="#quest14">I develop code on an embedded system with a compiler that
uses nonstandard key words and data types. I would like to run Splint on my code
but these nonstandard keywords cause parse errors. What should I do?<br />
</a></li>
<li><a href="#quest14b">How can I get Splint to recognize directory trees and local
source include directories?<br />
</a></li>
<li><a href="#quest20">I use realloc in my code. How can I get Splint in check this
code more effectively?<br />
</a></li>
<li style="list-style: none">
<h4><a href="#warnerror">Warnings and Errors</a></h4>
</li>
<li><a href="#quest11">Why do I get a warning when multiplying different integer
types? The C standard says this is ok. Why is this wrong?<br />
</a></li>
<li><a href="#quest12">The C standard says that what I'm doing is okay. Why does
Splint give me a warning?<br />
</a></li>
<li><a href="#quest13">Splint complains if I ignore the return value of scanf but
not printf?<br />
</a></li>
<li><a href="#quest18b">I get parse errors when I try to run Splint on code like
#define MACROdebug(...) blahblah . Can I use variadic macros in Splint?<br />
</a></li>
<li style="list-style: none">
<h4><a href="#bugs">Bugs</a></h4>
</li>
<li><a href="#quest21">I think I've found a bug in Splint. What should I do?<br />
</a></li>
<li><a href="#quest22">Splint tells me that there is a bug and I should report it.
What information should I send?<br />
</a></li>
<li style="list-style: none">
<h4><a href="#adinfo">Additional Information</a></h4>
</li>
<li><a href="#quest23">My question isn't answered here. How can I get more
information about Splint?<br />
</a></li>
</ol>
<h3>Questions and Answers</h3>
<ol>
<li style="list-style: none">
<h4><a id="genquest" name="genquest">General Questions About Splint</a></h4>
</li>
<li>
<p><a id="quest1" name="quest1">What is the difference between Splint and
LCLint?</a></p>
<p>Before 2002, Splint was known as LCLint. Splint 3.0 is the successor to LCLint
2.5.</p>
<blockquote>
LCLint was originally named for LCL, the Larch C Interface Language and lint, a
well-known C program checking tool. Because our tool has diverged from LCL, and
our focus now is on secure programming, it was renamed Splint. Splint's name
has (at least) three interpretations: specifications lint, secure programming
lint, and first aid for programmers. It's also easier to pronounce than
LCLint.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest2" name="quest2">What is the Splint logo?</a></p>
<blockquote>
Thomas Jefferson's Serpentine Walls at the University of Virginia. The walls
are one brick thick, but because of their design are both strong and aesthetic.
Like a secure program, secure walls depend on sturdy bricks, solid
construction, and elegant and principled design.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest3" name="quest3">Can I include Splint in my software
distribution?</a></p>
<blockquote>
Yes. Splint is licensed under the GNU General Public License. You may
redistribute it as you wish so long as credits and pointers to <a
href="http://www.splint.org/">www.splint.org</a> are not changed or removed.
Splint may be included in commercial distributions, and is included in several
Linux and freeware CDs. If you redistribute Splint, please let us know by
sending a message to <a
href="mailto:splint@cs.virginia.edu">splint@cs.virginia.edu</a>.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest4" name="quest4">Can we use your software in our company? (We are
not a GNU organization.)</a></p>
<blockquote>
Yes, splint is GPL-licensed. Anyone may use it. If you want to redistribute it,
check the license for details or contact us.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest9" name="quest9">Which compilers does Splint support?</a></p>
<blockquote>
It is independent from your compiler.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest5" name="quest5">Does Splint handle C++?</a></p>
<blockquote>
No. Splint handles ISO C99 (and some gcc extensions if +gnuextensions is used).
We don't have the resources (or the research justification) to build a C++
front end, but if you are interested in building a C++ front end the source
code is available, and I will certainly be willing to help.<br />
<br />
</blockquote>
</li>
<li style="list-style: none">
<h4><a id="install" name="install">Installation</a></h4>
</li>
<li>
<p><a id="quest6" name="quest6">I downloaded the Splint .tgz file but can't
figure out how to extract it. There is no 'z' option on the tar on my
system.</a></p>
<blockquote>
Check to see if there is GNU tar on your system, it is usually invoked by the
command gtar or gnutar. GNU tar supports the -z option.<br />
<br />
<p>You can also unzip the file then untar it. Do: gunzip filename.tar.gz to
unzip then tar -xvf filename.tar</p>
</blockquote>
</li>
<li>
<p><a id="quest7" name="quest7">I want to use Splint in win2000. How do I do
that?</a></p>
<blockquote>
See <a href="http://www.splint.org/">www.splint.org</a> for information on
Splint.<br />
<br />
<p><a
href="http://www.splint.org/win32.html">http://www.splint.org/win32.html</a>
for Windows instructions.</p>
</blockquote>
</li>
<li>
<p><a id="quest8" name="quest8">I have installed Splint for Windows 2000. Where
should I put the ".splintrc" file?</a></p>
<blockquote>
For Win32, Splint looks for splint.rc instead of .splintrc due to the DOS
filename problems. It will look first in the current directory, then in<br />
<br />
<p>your home directory. See the Splint manual for more information.</p>
</blockquote>
</li>
<li>
<p><a id="quest17" name="quest17">When I build Splint I get the following
error:</a></p>
<blockquote>
Checking for...<br />
<br />
<p>Checking manual...</p>
<p>cmx > / Checking tests2.2...</p>
<p>Checking tests2.4...</p>
<p>Checking tests2.5...</p>
<p>Checking db1...</p>
<p>0a1,2</p>
<p>> /cmx/tools/make -e clean</p>
<p>> /cmx/tools/make -e check</p>
<p>*** FAIL ***</p>
<p>Checking db2...</p>
<p>0a1,/tools/make -e clean</p>
<p>> /cmx/tools/make -e check</p>
<p>*** FAIL ***</p>
<p>Checking db3...</p>
</blockquote>
<p>Should I be worried?</p>
<blockquote>
Those diffs look harmless. It is likely that your make is set up slightly
differently than ours.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest18" name="quest18">I just installed Splint on a new machine. I get
a bunch of errors during building when the test suite is run. When I look through
the results, it seems like Splint is not reporting any errors in the code it
analyzes. What is going on?</a></p>
<blockquote>
One possibility is that the installation directory where the test suite is
running is on the system path (hence, splint won't report errors if
-sysdirerrors is set, as it is by default). Try adding +sysdirerrors to the
command line for the test suite to see if that is the problem, or installing
Splint in a different directory not in the system path.<br />
<br />
</blockquote>
</li>
<li style="list-style: none">
<h4><a id="usage" name="usage">Usage</a></h4>
</li>
<li>
<p><a id="quest15" name="quest15">Why am I getting so many parse
errors?</a></p>
<blockquote>
[[[ need to answer this ]]]
<br>
</blockquote>
</li>
<li>
<p><a id="quest16" name="quest16">Are all splint warnings
genuine errors?</a></p>
<blockquote>
Yes, please see <a href="http://www.splint.org/">www.splint.org</a> for
details.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest10" name="quest10">How does Splint handle const?</a></p>
<blockquote>
Splint doesn't interpret const (at all). See the manual section on modifies
checking (<a
href="http://www.splint.org/manual/html/sec7.html">http://www.splint.org/manual/html/sec7.html</a>).<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest14" name="quest14">I develop code on an embedded system with a
compiler that uses nonstandard key words and data types. I would like to run
Splint on my code but these nonstandard keywords cause parse errors. What should
I do?</a></p>
<blockquote>
<p>You can often use -D to solve this problem.</p>
<p>If you just want to ignore a keyword, you can add -Dnonstandardkeyword= to
make the preprocessor eliminate the keyword, where nonstandardkeyword is the
name of the keyword. Similarly, you can use -Dspecialtype=int to make a custom
type parse as an int.</p>
</blockquote>
</li>
<li>
<p><a id="quest14b" name="quest14b">How can I get Splint to recognize directory
trees and local source include directories? I've tried putting them in my path
but it doesn't seem to look beyond the current directory.</a></p>
<blockquote>
You can use -I to set the include path like you would with a compiler.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest20" name="quest20">I use realloc in my code. How can I get Splint
in check this code more effectively?</a></p>
<blockquote>
realloc has complicated semantics that make it difficult to use correctly. Make
sure that you understand realloc and that you really need to use it.<br />
<br />
<p>If you decide to use realloc, we recommend that you wrapper it. The document
Using Wrapper Functions explains how to do this. That document is included in
the Splint documentation and is also available at:</p>
<p><a
href="http://www.splint.org/documentation/realloc.htm">http://www.splint.org/documentation/realloc.htm</a></p>
</blockquote>
</li>
<li style="list-style: none">
<h4><a id="warnerror" name="warnerror">Warnings and Errors</a></h4>
</li>
<li>
<p><a id="quest11" name="quest11">Why do I get a Warning when multiplying
different integer types? The C standard says this is ok. Why is this
wrong?</a></p>
<blockquote>
There are lots of things that the C spec allows and defines clearly, that
Splint will provide warnings for. It's not a question of it being "wrong", it's
a matter of it being likely to reveal a programming mistake.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest12" name="quest12">The C standard says that what I'm doing is
okay. Why does Splint give me a warning?</a></p>
<blockquote>
See the previous question.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest13" name="quest13">Splint complains if I ignore the return value
of scanf but not printf?</a></p>
<blockquote>
This is just a strategic decision --- we view ignoring the result of a scanf to
be more likely to reveal a problem with the code than ignoring the result of a
printf, even though strict programmers will want to check printf also.<br />
<br />
<blockquote>
If you want stricter checking, use the flags +ansistrictlib, +posixstrictlib,
+unixstrictlib to select the strict versions of these libraries.<br />
<br />
</blockquote>
</blockquote>
</li>
<li>
<p><a id="quest18b" name="quest18b">I get parse errors when I try to run Splint
on code like #define MACROdebug(...) blahblah . Can I use variadic macros in
Splint?</a></p>
<blockquote>
Sorry, Splint does not yet support variadic macros. We hope to fix this in a
future release.<br />
<br />
</blockquote>
</li>
<li style="list-style: none">
<h4><a id="bugs" name="bugs">Bugs</a></h4>
</li>
<li>
<p><a id="quest21" name="quest21">I think I've found a bug in Splint. What should
I do?</a></p>
<blockquote>
See <a
href="http://www.splint.org/bugs.html">http://www.splint.org/bugs.html</a> for
a list of known bugs and instructions on reporting bugs.<br />
<br />
</blockquote>
</li>
<li>
<p><a id="quest22" name="quest22">Splint tells me that there is a bug and I
should report it. What information should I send?</a></p>
<blockquote>
Ideally we would like enough code to reproduce the problem. Small snippets of
code which trigger the bug are the best but more code is also acceptable.<br />
<br />
<p>If we're not able to reproduce the problem, then we are unlikely to be able
to patch Splint. However, we would still appreciate hearing about the bug and
may be able to at least to offer you advice on working around the problem.</p>
</blockquote>
</li>
<li style="list-style: none">
<h4><a id="adinfo" name="adinfo">Additional Information</a></h4>
</li>
<li>
<p><a id="quest23" name="quest23">My question isn't answered here. How can I get
more information about Splint?</a></p>
<blockquote>
First check the Splint manual and the mailing list archives.<br />
<br />
<p>The Splint manual is available at: <a
href="http://www.splint.org/manual/l">http://www.splint.org/manual/</a></p>
<p>The mailing list archives are at:</p>
<p><a
href="http://www.mail-archive.com/lclint-interest@virginia.edu/u">http://www.mail-archive.com/lclint-interest%40virginia.edu/</a></p>
<p>If you're still unable to find the information to answer your question, you
can try posting the question to the splint-discuss mailing list (see <a
href="http://www.splint.org/lists.html">http://www.splint.org/lists.html</a>)</p>
<p>You can also email us at splint@splint.org.</p>
</blockquote>
</li>
</ol>
<!--#include virtual="footer.html"-->
</body>
</html>