]> andersk Git - splint.git/blame - doc/html/faq.html
Updated FAQ to match the sytle of web pages on splint.org.
[splint.git] / doc / html / faq.html
CommitLineData
112c85fd 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
45c16651 4<link rel="stylesheet" type="text/css" href="http://www.splint.org/splint.css" title="style1">
112c85fd 5
6252ab26 6
112c85fd 7 <html xmlns="http://www.w3.org/1999/xhtml">
8 <title>Splint FAQ</title>
9 <head>
10 <meta name="generator"
11 content="HTML Tidy for Linux/x86 (vers 1st November 2002), see www.w3.org" />
12 <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8" />
13 <title></title>
112c85fd 14 </head>
15 <body lang="en-US">
6252ab26 16<table border="0" rules="none" bgcolor="#FFFFFF" width="95%" align=center cellpadding=0 cellspacing=0>
17<tr>
18<td colspan=2 bgcolor="#FFFFFF"></td>
19</tr>
20<tr>
21<td colspan=2 bgcolor="#FFFFFF"></td>
22</tr>
23<tr>
24
25<td colspan=2 bgcolor="#FFFFFF"></td>
26</tr>
27<tr>
28<td colspan=2 bgcolor="#FFFFFF"></td>
29</tr>
30<tr>
31<td colspan=2 bgcolor="#FFFFFF"></td>
32</tr>
33<tr>
34<td colspan=2 bgcolor="#FFFFFF"></td>
35</tr>
36<tr>
37<td>
38<font color="darkblue" face="arial,helvetica"><a href="http://www.splint.org/"><b>Splint</b> - Secure Programming Lint</a><br></font>
39
40</td>
41<td align=right>
42<font face="arial,helvetica,sans-serif"><font color="darkblue">
43<font size=-1>
44<a href="mailto:info@splint.org">info@splint.org</a></font>
45</font></font>
46</td>
47</tr>
48<tr>
49<td colspan=2 bgcolor="darkblue"></td>
50</tr>
51<tr>
52<td colspan=2 bgcolor="darkblue"></td>
53</tr>
54<tr>
55<td colspan=2 bgcolor="white"></td>
56
57</tr>
58<tr>
59<td colspan=2 bgcolor="slate"></td>
60</tr>
61<tr>
62<td>
63<font face="arial,helvetica,sans-serif" size=-1>
64<a
65href="http://www.splint.org/download.html">Download</a>
66-
67<a
68HREF="http://www.splint.org/documentation/">Documentation</a>
69-
70<a href="http://www.splint.org/manual/">Manual</a>
71-
72<a
73href="http://www.splint.org/links.html">Links</a>
74
75</font>
76</td>
77<td align=right>
78<font face="arial,helvetica,sans-serif" size=-1>
79<a
80href="http://www.splint.org/bugs.html">Reporting
81Bugs</a> -
82<a
83href="http://www.splint.org/lists.html">Mailing
84Lists</a> &nbsp;&nbsp;&nbsp;&nbsp;
85<a
86href="http://www.splint.org/sponsors.html">Sponsors</a>
87-
88<a
89href="http://www.splint.org/credits.html">Credits</a>
90</font>
91</td>
92
93</tr>
94</table>
95
96 <h1>Splint - Frequently Asked Questions</h1>
112c85fd 97
98 <h3>Index</h3><ol><li><a href="#quest1"><p>What is the difference between Splint and LCLint?</p>
99 </a></li>
100 <p><li><a href="#quest2">What is the Splint logo?</p>
101 </a></li>
102 <p><li><a href="#quest3">Can I include Splint in my software distribution?</p>
103 </a></li>
104 <p><li><a href="#quest4">Can we use your software in our company? (We are not a GNU organization.)</p>
105 </a></li>
106 <p><li><a href="#quest5">Does Splint handle C++?</p>
107 </a></li>
108 <p><li><a href="#quest6">I downloaded the Splint .tgz file but can't figure out how to extract it.
109 There is no 'z' option on the tar on my system.</p>
110 </a></li>
111 <p><li><a href="#quest7">I want to use Splint in win2000. How do I do that?</p>
112 </a></li>
113 <p><li><a href="#quest8">I have installed Splint for Windows 2000. Where should I put the ".splintrc"
114 file?</p>
115 </a></li>
116 <p><li><a href="#quest9">Which compilers does Splint support?</p>
117 </a></li>
118 <p><li><a href="#quest10">How does Splint handle const?</p>
119 </a></li>
120 <p><li><a href="#quest11">Why do I get a warning when multiplying different integer types? The C
121 standard says this is ok. Why is this wrong?</p>
122 </a></li>
123 <p><li><a href="#quest12">The C standard says that what I'm doing is okay. Why does Splint give me a
124 warning?</p>
125 </a></li>
126 <p><li><a href="#quest13">Splint complains if I ignore the return value of scanf but not printf?</p>
127 </a></li>
128 <p><li><a href="#quest14">I develop code on an embedded system with a compiler that uses nonstandard key
129 words and data types. I would like to run Splint on my code but these nonstandard
130 keywords cause parse errors. What should I do?</p>
131 </a></li>
132 <p><li><a href="#quest14b">How can I get Splint to recognize directory trees and local source include
133 directories?</p>
134 </a></li>
135 <p><li><a href="#quest15">I heard that we will get lot of parse errors when we run this tool first time.
136 Hence we need to modify source code. Is it correct ?</p>
137 </a></li>
138 <p><li><a href="#quest16">I heard that Splint can generate some spurious errors ( not genuine errors).
139 Is it correct ?</p>
140 </a></li>
141 <p><li><a href="#quest17">When I build Splint I get the following errors.... Should I be worried?</p>
142 </a></li>
143 <p><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.
144 When I look through the results, it seems like Splint is not reporting any errors in the code it analyzes. What is going on?
145 </p>
146 </a></li>
147 <p><li><a href="#quest18b">I get parse errors when I try to run Splint on code like #define
148 MACROdebug(...) blahblah . Can I use variadic macros in Splint?</p>
149 </a></li>
150 <p><li><a href="#quest20">I use realloc in my code. How can I get Splint in check this code more
151 effectively?</p>
152 </a></li>
153 <p><li><a href="#quest21">I think I've found a bug in Splint. What should I do?</p>
154 </a></li>
155 <p><li><a href="#quest22">Splint tells me that there is a bug and I should report it. What information
156 should I send?</p>
157 </a></li>
158 <p><li><a href="#quest23">My question isn't answered here. How can I get more information about
159 Splint?</p>
160 </a></li>
161 </ol>
162
163 <h3>Questions and Answers</h3>
164 <ol>
165
166 <li><p><a name="quest1">What is the difference between Splint and LCLint?</p>
167 <p>Before 2002, Splint was known as LCLint. Splint 3.0 is the successor to LCLint
168 2.5.</p>
169
170 <p><blockquote>LCLint was originally named for LCL, the Larch C Interface Language and lint, a
171 well-known C program checking tool. Because our tool has diverged from LCL, and our
172 focus now is on secure programming, it was renamed Splint. Splint's name has (at
173 least) three interpretations: specifications lint, secure programming lint, and first
174 aid for programmers. It's also easier to pronounce than LCLint.</p></blockquote>
175 <li><p><a name="quest2">What is the Splint logo?</p>
176 <p><blockquote>Thomas Jefferson's Serpentine Walls at the University of Virginia. The walls are
177 one brick thick, but because of their design are both strong and aesthetic. Like a
178 secure program, secure walls depend on sturdy bricks, solid construction, and elegant
179 and principled design.</p></blockquote>
180 <li><p><a name="quest3">Can I include Splint in my software distribution?</p>
181 <p><blockquote>Yes. Splint is licensed under the GNU General Public License. You may redistribute
182 it as you wish so long as credits and pointers to <a
183 href="http://www.splint.org/">www.splint.org</a> are not changed or removed. Splint
184 may be included in commercial distributions, and is included in several Linux and
185 freeware CDs. If you redistribute Splint, please let us know by sending a message to
186 <a href="mailto:splint@cs.virginia.edu">splint@cs.virginia.edu</a>.</p></blockquote>
187 <li><p><a name="quest4">Can we use your software in our company? (We are not a GNU organization.)</p>
188 <p><blockquote>Yes, splint is GPL-licensed. Anyone may use it. If you want to
189 redistribute it, check the license for details or contact us.</p></blockquote>
190 <li><p><a name="quest5">Does Splint handle C++?</p>
191 <p><blockquote>No. Splint handles ISO C99 (and some gcc extensions if +gnuextensions is used). We
192 don't have the resources (or the research justification) to build a C++ front end,
193 but if you are interested in building a C++ front end the source code is available,
194 and I will certainly be willing to help.</p></blockquote>
195 <li><p><a name="quest6">I downloaded the Splint .tgz file but can't figure out how to extract it. There is
196 no 'z' option on the tar on my system.</p>
197 <p><blockquote>Check to see if there is GNU tar on your system, it is usually invoked by the
198 command gtar or gnutar. GNU tar supports the -z option.</p>
199 <p>You can also unzip the file then untar it. Do: gunzip filename.tar.gz to unzip
200 then tar -xvf filename.tar</p></blockquote>
201 <li><p><a name="quest7">I want to use Splint in win2000. How do I do that?</p>
202 <p><blockquote>See <a href="http://www.splint.org/">www.splint.org</a> for information on
203 Splint.</p>
204 <p><a href="http://www.splint.org/win32.html">http://www.splint.org/win32.html</a>
205 for Windows instructions.</p></blockquote>
206 <li><p><a name="quest8">I have installed Splint for Windows 2000. Where should I put the ".splintrc"
207 file?</p>
208 <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</p>
209 <p>your home directory. See the Splint manual for more information.</p>
210 </blockquote>
211 <li><p><a name="quest9">Which compilers does Splint support?</p>
212 <p><blockquote>It is independent from your compiler.</p></blockquote>
213 <li><p><a name="quest10">How does Splint handle const?</p>
214 <p><blockquote>Splint doesn't interpret const (at all). See the manual section on
215 modifies checking (<a href="http://www.splint.org/manual/html/sec7.html">http://www.splint.org/manual/html/sec7.html</a>).</p></blockquote>
216 <li><p><a name="quest11">Why do I get a Warning when multiplying different integer types? The C standard
217 says this is ok. Why is this wrong?</p>
218 <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",
219 it's a matter of it being likely to reveal a programming mistake.</p></blockquote>
220 <li><p><a name="quest12">The C standard says that what I'm doing is okay. Why does Splint give me a
221 warning?</p>
222 <p><blockquote>See the previous question.</p></blockquote>
223 <li><p><a name="quest13">Splint complains if I ignore the return value of scanf but not printf?</p>
224 <p><blockquote>This is just a strategic decision --- we view ignoring the result of a
225 scanf to be more likely to reveal a problem with the code than ignoring
226 the result of a printf, even though strict programmers will want to check
227 printf also.</p>
228 <p><blockquote>If you want stricter checking, use the flags +ansistrictlib, +posixstrictlib,
229 +unixstrictlib to select the strict versions of these libraries.</p></blockquote>
230 </blockquote>
231 <li><p><a name="quest14">I develop code on an embedded system with a compiler that uses nonstandard key
232 words and data types. I would like to run Splint on my code but these nonstandard
233 keywords cause parse errors. What should I do?</p>
234
235 <blockquote><p>You can often use -D to solve this problem.</p>
236 <p>If you just want to ignore a keyword, you can add
237 -Dnonstandardkeyword=
238 to make the preprocessor eliminate the keyword, where nonstandardkeyword is the
239 name of the keyword. Similarly, you can use
240 -Dspecialtype=int
241 to make a custom type parse as an int.</p></blockquote>
242 <li><p><a name="quest14b">How can I get Splint to recognize directory trees and local source include
243 directories? I've tried putting them in my path but it doesn't seem to look beyond
244 the current directory.</p>
245 <p><blockquote>You can use -I to set the include path like you would with a compiler.</p></blockquote>
246 <li><p><a name="quest15">I heard that we will get lot of parse errors when we run this tool first time.
247 Hence we need to modify source code. Is it correct ?</p>
248 <p><blockquote>Usually not, but Splint doesn't support all C99 extensions.</p></blockquote>
249 <li><p><a name="quest16">I heard that Splint can generate some spurious errors ( not genuine errors). Is it
250 correct ?</p>
251 <p><blockquote>Yes, please see <a href="http://www.splint.org/">www.splint.org</a> for
252 details.</p></blockquote>
253 <li><p><a name="quest17">When I build Splint I get the following error:</p>
254 <p><blockquote>Checking for...</p>
255 <p>Checking manual...</p>
256 <p>cmx &gt; / Checking tests2.2...</p>
257 <p>Checking tests2.4...</p>
258 <p>Checking tests2.5...</p>
259 <p>Checking db1...</p>
260 <p>0a1,2</p>
261 <p>&gt; /cmx/tools/make -e clean</p>
262 <p>&gt; /cmx/tools/make -e check</p>
263 <p>*** FAIL ***</p>
264 <p>Checking db2...</p>
265 <p>0a1,/tools/make -e clean</p>
266 <p>&gt; /cmx/tools/make -e check</p>
267 <p>*** FAIL ***</p>
268 <p>Checking db3...</p>
269 </blockquote>
270 <p>Should I be worried?</p>
271 </blockquote>
272 <p><blockquote>Those diffs look harmless. It is likely that your make is set up slightly
273 differently than ours.</p></blockquote>
274 <li><p><a name="quest18">I just installed Splint on a new machine. I get a bunch of errors during building
275 when the test suite is run. When I look through the results, it seems like Splint is
276 not reporting any errors in the code it analyzes. What is going on?</p>
277 <p><blockquote>One possibility is that the installation directory where the test suite is
278 running is on the system path (hence, splint won't report errors if
279 -sysdirerrors is set, as it is by default). Try adding +sysdirerrors to
280 the command line for the test suite to see if that is the problem, or installing
281 Splint in a different directory not in the system path.</p></blockquote>
282 <li><p><a name="quest18b">I get parse errors when I try to run Splint on code like #define MACROdebug(...)
283 blahblah . Can I use variadic macros in Splint?</p>
284 <p><blockquote>Sorry, Splint does not yet support variadic macros. We hope to fix this in a
285 future release.</p></blockquote>
286 <li><p><a name="quest20">I use realloc in my code. How can I get Splint in check this code more
287 effectively?</p>
288 <p><blockquote>realloc has complicated semantics that make it difficult to use correctly. Make
289 sure that you understand realloc and that you really need to use it.</p>
290 <p>If you decide to use realloc, we recommend that you wrapper it. The document Using
291 Wrapper Functions explains how to do this. That document is included in the Splint
292 documentation and is also available at:</p>
293 <p><a
294 href="http://www.splint.org/documentation/realloc.htm">http://www.splint.org/documentation/realloc.htm</a></p></blockquote>
295 <li><p><a name="quest21">I think I've found a bug in Splint. What should I do?</p>
296 <p><blockquote>See <a href="http://www.splint.org/bugs.html">http://www.splint.org/bugs.html</a>
297 for a list of known bugs and instructions on reporting bugs.</p></blockquote>
298 <li><p><a name="quest22">Splint tells me that there is a bug and I should report it. What information
299 should I send?</p>
300 <p><blockquote>Ideally we would like enough code to reproduce the problem. Small snippets of code
301 which trigger the bug are the best but more code is also acceptable.</p>
302 <p>If we're not able to reproduce the problem, then we are unlikely to be able to
303 patch Splint. However, we would still appreciate hearing about the bug and may be
304 able to at least to offer you advice on working around the problem.</p></blockquote>
305 <li><p><a name="quest23">My question isn't answered here. How can I get more information about Splint?</p>
306 <p><blockquote>First check the Splint manual and the mailing list archives.</p>
307 <p>The Splint manual is available at: <a
308 href="http://www.splint.org/manual/l">http://www.splint.org/manual/</a></p>
309 <p>The mailing list archives are at:</p>
310 <p><a
311 href="http://www.mail-archive.com/lclint-interest@virginia.edu/u">http://www.mail-archive.com/lclint-interest%40virginia.edu/</a></p>
312 <p>If you're still unable to find the information to answer your question, you can
313 try posting the question to the splint-discuss mailing list (see <a
314 href="http://www.splint.org/lists.html">http://www.splint.org/lists.html</a>)</p>
315 <p>You can also email us at splint@splint.org.</p>
316 </blockquote>
6252ab26 317<table border="0" rules="none" bgcolor="#FFFFFF" width="95%" align=center cellpadding=0 cellspacing=0>
318
319<tr valign=top>
320<td colspan=2 bgcolor="darkblue"></td>
321<tr valign=top>
322<td colspan=2 bgcolor="darkblue"></td>
323<tr valign=top>
324<td colspan=2 bgcolor="white"></td>
325
326</tr>
327<tr valign=top>
328<td width=135 >
329<a href="http://www.splint.org"><img src="http://www.splint.org/glowingwall-narrows.jpg"
330width=132 height=65 border=0 alt=""></a>
331</td>
332<td>
333<table cellpadding=0 cellspacing=0 width="100%">
334<tr>
335<td colspan=2 bgcolor="slate"></td>
336</tr>
337<tr>
338<td>
339<font color="darkblue" face="arial,helvetica"><a href="http://www.splint.org/"><b>Splint</b> - Secure Programming Lint</a></font>
340</td>
341
342<td align=right>
343<font face="arial,helvetica,sans-serif"><font color="darkblue">
344<font size=-1>
345<a href="mailto:info@splint.org">info@splint.org</a></font>
346</font></font>
347</td>
348</tr>
349
350<tr>
351<td>
352<font face="arial,helvetica,sans-serif" size=-1>
353<a
354href="http://www.splint.org/download.html">Download</a>
355-
356<a
357HREF="http://www.splint.org/documentation/">Documentation</a>
358
359-
360<a href="http://www.splint.org/manual/">Manual</a>
361-
362<a
363href="http://www.splint.org/links.html">Links</a><br>
364
365<a
366href="http://www.splint.org/source.html">Source</a>
367-
368<a
369HREF="http://www.splint.org/linux.html">Linux</a>
370-
371<a href="http://www.splint.org/pubs.html">Publications</a>
372-
373<a
374href="http://www.splint.org/talks.html">Talks</a><br>
375
376</font>
377
378</td>
379<td align=right valign=top>
380
381<font face="arial,helvetica,sans-serif" size=-1>
382<a
383href="http://www.splint.org/bugs.html">Reporting
384Bugs</a> -
385<a
386href="http://www.splint.org/lists.html">Mailing
387Lists</a> &nbsp;&nbsp;<img src="http://sourceforge.net/sflogo.php?group_id=9538" width="0" height="0" alt="">
388
389&nbsp;&nbsp;
390<a
391href="http://www.splint.org/sponsors.html">Sponsors</a>
392
393-
394<a
395href="http://www.splint.org/credits.html">Credits</a>
396</font>
397</td>
398</tr>
399
400</table>
401
402</td>
403</tr>
404</table>
405
112c85fd 406 </body>
407</html>
This page took 0.10006 seconds and 5 git commands to generate.