1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
6 content="HTML Tidy for Linux/x86 (vers 1st November 2002), see www.w3.org" />
7 <link rel="stylesheet" type="text/css" href="http://www.splint.org/splint.css"
9 <title>Splint FAQ</title>
12 <!--#include virtual="header.html"-->
13 <h1>Splint - Frequently Asked Questions</h1>
16 <h4><a href="#genquest">General Questions About Splint</a></h4>
17 <li><a href="#quest1">What is the difference between Splint and LCLint?</a><br />
19 <li><a href="#quest2">What is the Splint logo?<br />
21 <li><a href="#quest3">Can I include Splint in my software distribution?<br />
23 <li><a href="#quest4">Can we use your software in our company? (We are not a GNU
26 <li><a href="#quest9">Which compilers does Splint support?<br />
28 <li><a href="#quest5">Does Splint handle C++?<br />
30 <li style="list-style: none">
31 <h4><a href="#install">Installation</a></h4>
33 <li><a href="#quest6">I downloaded the Splint .tgz file but can't figure out how to
34 extract it. There is no 'z' option on the tar on my system.<br />
36 <li><a href="#quest7">I want to use Splint in win2000. How do I do that?<br />
38 <li><a href="#quest8">I have installed Splint for Windows 2000. Where should I put
39 the ".splintrc" file?<br />
41 <li><a href="#quest17">When I build Splint I get the following errors.... Should I
44 <li><a href="#quest18">I just installed Splint on a new machine. I get a bunch of
45 errors during building when the test suite is run. When I look through the results,
46 it seems like Splint is not reporting any errors in the code it analyzes. What is
49 <h4><a href="#usage">Usage</a></h4>
50 <li><a href="#quest15">I heard that we will get lot of parse errors when we run
51 this tool first time. Hence we need to modify source code. Is it correct ?<br />
53 <li><a href="#quest16">I heard that Splint can generate some spurious errors ( not
54 genuine errors). Is it correct ?<br />
56 <li><a href="#quest10">How does Splint handle const?<br />
58 <li><a href="#quest14">I develop code on an embedded system with a compiler that
59 uses nonstandard key words and data types. I would like to run Splint on my code
60 but these nonstandard keywords cause parse errors. What should I do?<br />
62 <li><a href="#quest14b">How can I get Splint to recognize directory trees and local
63 source include directories?<br />
65 <li><a href="#quest20">I use realloc in my code. How can I get Splint in check this
66 code more effectively?<br />
68 <h4><a href="#warnerror">Warnings and Errors</a></h4>
69 <li><a href="#quest11">Why do I get a warning when multiplying different integer
70 types? The C standard says this is ok. Why is this wrong?<br />
72 <li><a href="#quest12">The C standard says that what I'm doing is okay. Why does
73 Splint give me a warning?<br />
75 <li><a href="#quest13">Splint complains if I ignore the return value of scanf but
78 <li><a href="#quest18b">I get parse errors when I try to run Splint on code like
79 #define MACROdebug(...) blahblah . Can I use variadic macros in Splint?<br />
81 <h4><a href="#bugs">Bugs</a></h4>
82 <li><a href="#quest21">I think I've found a bug in Splint. What should I do?<br />
84 <li><a href="#quest22">Splint tells me that there is a bug and I should report it.
85 What information should I send?<br />
87 <h4><a href="#adinfo">Additional Information</a></h4>
88 <li><a href="#quest23">My question isn't answered here. How can I get more
89 information about Splint?<br />
92 <h3>Questions and Answers</h3>
94 <h4><a id="genquest" name="genquest">General Questions About Splint</a></h4>
96 <p><a id="quest1" name="quest1">What is the difference between Splint and
98 <p>Before 2002, Splint was known as LCLint. Splint 3.0 is the successor to LCLint
101 LCLint was originally named for LCL, the Larch C Interface Language and lint, a
102 well-known C program checking tool. Because our tool has diverged from LCL, and
103 our focus now is on secure programming, it was renamed Splint. Splint's name
104 has (at least) three interpretations: specifications lint, secure programming
105 lint, and first aid for programmers. It's also easier to pronounce than
111 <p><a id="quest2" name="quest2">What is the Splint logo?</a></p>
113 Thomas Jefferson's Serpentine Walls at the University of Virginia. The walls
114 are one brick thick, but because of their design are both strong and aesthetic.
115 Like a secure program, secure walls depend on sturdy bricks, solid
116 construction, and elegant and principled design.<br />
121 <p><a id="quest3" name="quest3">Can I include Splint in my software
122 distribution?</a></p>
124 Yes. Splint is licensed under the GNU General Public License. You may
125 redistribute it as you wish so long as credits and pointers to <a
126 href="http://www.splint.org/">www.splint.org</a> are not changed or removed.
127 Splint may be included in commercial distributions, and is included in several
128 Linux and freeware CDs. If you redistribute Splint, please let us know by
129 sending a message to <a
130 href="mailto:splint@cs.virginia.edu">splint@cs.virginia.edu</a>.<br />
135 <p><a id="quest4" name="quest4">Can we use your software in our company? (We are
136 not a GNU organization.)</a></p>
138 Yes, splint is GPL-licensed. Anyone may use it. If you want to redistribute it,
139 check the license for details or contact us.<br />
144 <p><a id="quest9" name="quest9">Which compilers does Splint support?</a></p>
146 It is independent from your compiler.<br />
151 <p><a id="quest5" name="quest5">Does Splint handle C++?</a></p>
153 No. Splint handles ISO C99 (and some gcc extensions if +gnuextensions is used).
154 We don't have the resources (or the research justification) to build a C++
155 front end, but if you are interested in building a C++ front end the source
156 code is available, and I will certainly be willing to help.<br />
160 <h4><a id="install" name="install">Installation</a></h4>
162 <p><a id="quest6" name="quest6">I downloaded the Splint .tgz file but can't
163 figure out how to extract it. There is no 'z' option on the tar on my
166 Check to see if there is GNU tar on your system, it is usually invoked by the
167 command gtar or gnutar. GNU tar supports the -z option.<br />
170 <p>You can also unzip the file then untar it. Do: gunzip filename.tar.gz to
171 unzip then tar -xvf filename.tar</p>
175 <p><a id="quest7" name="quest7">I want to use Splint in win2000. How do I do
178 See <a href="http://www.splint.org/">www.splint.org</a> for information on
183 href="http://www.splint.org/win32.html">http://www.splint.org/win32.html</a>
184 for Windows instructions.</p>
188 <p><a id="quest8" name="quest8">I have installed Splint for Windows 2000. Where
189 should I put the ".splintrc" file?</a></p>
191 For Win32, Splint looks for splint.rc instead of .splintrc due to the DOS
192 filename problems. It will look first in the current directory, then in<br />
195 <p>your home directory. See the Splint manual for more information.</p>
199 <p><a id="quest17" name="quest17">When I build Splint I get the following
202 Checking for...<br />
205 <p>Checking manual...</p>
206 <p>cmx > / Checking tests2.2...</p>
207 <p>Checking tests2.4...</p>
208 <p>Checking tests2.5...</p>
209 <p>Checking db1...</p>
211 <p>> /cmx/tools/make -e clean</p>
212 <p>> /cmx/tools/make -e check</p>
214 <p>Checking db2...</p>
215 <p>0a1,/tools/make -e clean</p>
216 <p>> /cmx/tools/make -e check</p>
218 <p>Checking db3...</p>
220 <p>Should I be worried?</p>
222 Those diffs look harmless. It is likely that your make is set up slightly
223 differently than ours.<br />
228 <p><a id="quest18" name="quest18">I just installed Splint on a new machine. I get
229 a bunch of errors during building when the test suite is run. When I look through
230 the results, it seems like Splint is not reporting any errors in the code it
231 analyzes. What is going on?</a></p>
233 One possibility is that the installation directory where the test suite is
234 running is on the system path (hence, splint won't report errors if
235 -sysdirerrors is set, as it is by default). Try adding +sysdirerrors to the
236 command line for the test suite to see if that is the problem, or installing
237 Splint in a different directory not in the system path.<br />
241 <h4><a id="usage" name="usage">Usage</a></h4>
243 <p><a id="quest15" name="quest15">I heard that we will get lot of parse errors
244 when we run this tool first time. Hence we need to modify source code. Is it
247 Usually not, but Splint doesn't support all C99 extensions.<br />
252 <p><a id="quest16" name="quest16">I heard that Splint can generate some spurious
253 errors ( not genuine errors). Is it correct ?</a></p>
255 Yes, please see <a href="http://www.splint.org/">www.splint.org</a> for
261 <p><a id="quest10" name="quest10">How does Splint handle const?</a></p>
263 Splint doesn't interpret const (at all). See the manual section on modifies
265 href="http://www.splint.org/manual/html/sec7.html">http://www.splint.org/manual/html/sec7.html</a>).<br />
270 <p><a id="quest14" name="quest14">I develop code on an embedded system with a
271 compiler that uses nonstandard key words and data types. I would like to run
272 Splint on my code but these nonstandard keywords cause parse errors. What should
275 <p>You can often use -D to solve this problem.</p>
276 <p>If you just want to ignore a keyword, you can add -Dnonstandardkeyword= to
277 make the preprocessor eliminate the keyword, where nonstandardkeyword is the
278 name of the keyword. Similarly, you can use -Dspecialtype=int to make a custom
279 type parse as an int.</p>
283 <p><a id="quest14b" name="quest14b">How can I get Splint to recognize directory
284 trees and local source include directories? I've tried putting them in my path
285 but it doesn't seem to look beyond the current directory.</a></p>
287 You can use -I to set the include path like you would with a compiler.<br />
292 <p><a id="quest20" name="quest20">I use realloc in my code. How can I get Splint
293 in check this code more effectively?</a></p>
295 realloc has complicated semantics that make it difficult to use correctly. Make
296 sure that you understand realloc and that you really need to use it.<br />
299 <p>If you decide to use realloc, we recommend that you wrapper it. The document
300 Using Wrapper Functions explains how to do this. That document is included in
301 the Splint documentation and is also available at:</p>
303 href="http://www.splint.org/documentation/realloc.htm">http://www.splint.org/documentation/realloc.htm</a></p>
306 <h4><a id="warnerror" name="warnerror">Warnings and Errors</a></h4>
308 <p><a id="quest11" name="quest11">Why do I get a Warning when multiplying
309 different integer types? The C standard says this is ok. Why is this
312 There are lots of things that the C spec allows and defines clearly, that
313 Splint will provide warnings for. It's not a question of it being "wrong", it's
314 a matter of it being likely to reveal a programming mistake.<br />
319 <p><a id="quest12" name="quest12">The C standard says that what I'm doing is
320 okay. Why does Splint give me a warning?</a></p>
322 See the previous question.<br />
327 <p><a id="quest13" name="quest13">Splint complains if I ignore the return value
328 of scanf but not printf?</a></p>
330 This is just a strategic decision --- we view ignoring the result of a scanf to
331 be more likely to reveal a problem with the code than ignoring the result of a
332 printf, even though strict programmers will want to check printf also.<br />
336 If you want stricter checking, use the flags +ansistrictlib, +posixstrictlib,
337 +unixstrictlib to select the strict versions of these libraries.<br />
343 <p><a id="quest18b" name="quest18b">I get parse errors when I try to run Splint
344 on code like #define MACROdebug(...) blahblah . Can I use variadic macros in
347 Sorry, Splint does not yet support variadic macros. We hope to fix this in a
348 future release.<br />
352 <h4><a id="bugs" name="bugs">Bugs</a></h4>
354 <p><a id="quest21" name="quest21">I think I've found a bug in Splint. What should
358 href="http://www.splint.org/bugs.html">http://www.splint.org/bugs.html</a> for
359 a list of known bugs and instructions on reporting bugs.<br />
364 <p><a id="quest22" name="quest22">Splint tells me that there is a bug and I
365 should report it. What information should I send?</a></p>
367 Ideally we would like enough code to reproduce the problem. Small snippets of
368 code which trigger the bug are the best but more code is also acceptable.<br />
371 <p>If we're not able to reproduce the problem, then we are unlikely to be able
372 to patch Splint. However, we would still appreciate hearing about the bug and
373 may be able to at least to offer you advice on working around the problem.</p>
376 <h4><a id="adinfo" name="adinfo">Additional Information</a></h4>
378 <p><a id="quest23" name="quest23">My question isn't answered here. How can I get
379 more information about Splint?</a></p>
381 First check the Splint manual and the mailing list archives.<br />
384 <p>The Splint manual is available at: <a
385 href="http://www.splint.org/manual/l">http://www.splint.org/manual/</a></p>
386 <p>The mailing list archives are at:</p>
388 href="http://www.mail-archive.com/lclint-interest@virginia.edu/u">http://www.mail-archive.com/lclint-interest%40virginia.edu/</a></p>
389 <p>If you're still unable to find the information to answer your question, you
390 can try posting the question to the splint-discuss mailing list (see <a
391 href="http://www.splint.org/lists.html">http://www.splint.org/lists.html</a>)</p>
392 <p>You can also email us at splint@splint.org.</p>
396 <!--#include virtual="footer.html"-->