]>
Commit | Line | Data |
---|---|---|
e63e0a4a | 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"> | |
112c85fd | 4 | <head> |
5 | <meta name="generator" | |
6 | content="HTML Tidy for Linux/x86 (vers 1st November 2002), see www.w3.org" /> | |
e63e0a4a | 7 | <link rel="stylesheet" type="text/css" href="http://www.splint.org/splint.css" |
8 | title="style1" /> | |
9 | <title>Splint FAQ</title> | |
112c85fd | 10 | </head> |
e63e0a4a | 11 | <body> |
12 | <!--#include virtual="header.html"--> | |
6252ab26 | 13 | <h1>Splint - Frequently Asked Questions</h1> |
e63e0a4a | 14 | <h3>Index</h3> |
15 | ||
16 | <ol> | |
17 | <h4>General Questions About Splint</h4> | |
18 | <li> | |
19 | <a href="#quest1"> | |
20 | What is the difference between Splint and LCLint?</a><br /> | |
21 | </li> | |
22 | <li><a href="#quest2">What is the Splint logo?<br /> | |
112c85fd | 23 | </a></li> |
e63e0a4a | 24 | <li><a href="#quest3">Can I include Splint in my software distribution?<br /> |
112c85fd | 25 | </a></li> |
e63e0a4a | 26 | <li><a href="#quest4">Can we use your software in our company? (We are not a GNU |
27 | organization.)<br /> | |
112c85fd | 28 | </a></li> |
e63e0a4a | 29 | <li><a href="#quest5">Does Splint handle C++?<br /> |
112c85fd | 30 | </a></li> |
e63e0a4a | 31 | |
32 | <h4> Installation</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 /> | |
112c85fd | 35 | </a></li> |
e63e0a4a | 36 | <li><a href="#quest7">I want to use Splint in win2000. How do I do that?<br /> |
112c85fd | 37 | </a></li> |
e63e0a4a | 38 | <li><a href="#quest8">I have installed Splint for Windows 2000. Where should I put |
39 | the ".splintrc" file?<br /> | |
112c85fd | 40 | </a></li> |
e63e0a4a | 41 | <h4>Usage</h4> |
42 | <li><a href="#quest9">Which compilers does Splint support?<br /> | |
112c85fd | 43 | </a></li> |
e63e0a4a | 44 | <li><a href="#quest10">How does Splint handle const?<br /> |
112c85fd | 45 | </a></li> |
e63e0a4a | 46 | <li><a href="#quest11">Why do I get a warning when multiplying different integer |
47 | types? The C standard says this is ok. Why is this wrong?<br /> | |
112c85fd | 48 | </a></li> |
e63e0a4a | 49 | <li><a href="#quest12">The C standard says that what I'm doing is okay. Why does |
50 | Splint give me a warning?<br /> | |
112c85fd | 51 | </a></li> |
e63e0a4a | 52 | <li><a href="#quest13">Splint complains if I ignore the return value of scanf but |
53 | not printf?<br /> | |
112c85fd | 54 | </a></li> |
e63e0a4a | 55 | <li><a href="#quest14">I develop code on an embedded system with a compiler that |
56 | uses nonstandard key words and data types. I would like to run Splint on my code | |
57 | but these nonstandard keywords cause parse errors. What should I do?<br /> | |
112c85fd | 58 | </a></li> |
e63e0a4a | 59 | <li><a href="#quest14b">How can I get Splint to recognize directory trees and local |
60 | source include directories?<br /> | |
112c85fd | 61 | </a></li> |
e63e0a4a | 62 | <li><a href="#quest15">I heard that we will get lot of parse errors when we run |
63 | this tool first time. Hence we need to modify source code. Is it correct ?<br /> | |
112c85fd | 64 | </a></li> |
e63e0a4a | 65 | <li><a href="#quest16">I heard that Splint can generate some spurious errors ( not |
66 | genuine errors). Is it correct ?<br /> | |
112c85fd | 67 | </a></li> |
e63e0a4a | 68 | <li><a href="#quest17">When I build Splint I get the following errors.... Should I |
69 | be worried?<br /> | |
112c85fd | 70 | </a></li> |
e63e0a4a | 71 | <li><a href="#quest18">I just installed Splint on a new machine. I get a bunch of |
72 | errors during building when the test suite is run. When I look through the results, | |
73 | it seems like Splint is not reporting any errors in the code it analyzes. What is | |
74 | going on?<br /> | |
112c85fd | 75 | </a></li> |
e63e0a4a | 76 | <li><a href="#quest18b">I get parse errors when I try to run Splint on code like |
77 | #define MACROdebug(...) blahblah . Can I use variadic macros in Splint?<br /> | |
112c85fd | 78 | </a></li> |
e63e0a4a | 79 | <li><a href="#quest20">I use realloc in my code. How can I get Splint in check this |
80 | code more effectively?<br /> | |
112c85fd | 81 | </a></li> |
e63e0a4a | 82 | <h4>Bugs</h4> |
83 | <li><a href="#quest21">I think I've found a bug in Splint. What should I do?<br /> | |
112c85fd | 84 | </a></li> |
e63e0a4a | 85 | <li><a href="#quest22">Splint tells me that there is a bug and I should report it. |
86 | What information should I send?<br /> | |
112c85fd | 87 | </a></li> |
e63e0a4a | 88 | <li><a href="#quest23">My question isn't answered here. How can I get more |
89 | information about Splint?<br /> | |
112c85fd | 90 | </a></li> |
91 | </ol> | |
112c85fd | 92 | <h3>Questions and Answers</h3> |
93 | <ol> | |
e63e0a4a | 94 | <h4>General Questions About Splint</h4> |
95 | <li> | |
96 | <p><a id="quest1" name="quest1">What is the difference between Splint and | |
97 | LCLint?</a></p> | |
98 | <p>Before 2002, Splint was known as LCLint. Splint 3.0 is the successor to LCLint | |
99 | 2.5.</p> | |
100 | <blockquote> | |
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 | |
106 | LCLint.<br /> | |
107 | <br /> | |
108 | </blockquote> | |
109 | </li> | |
110 | <li> | |
111 | <p><a id="quest2" name="quest2">What is the Splint logo?</a></p> | |
112 | <blockquote> | |
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 /> | |
117 | <br /> | |
118 | </blockquote> | |
119 | </li> | |
120 | <li> | |
121 | <p><a id="quest3" name="quest3">Can I include Splint in my software | |
122 | distribution?</a></p> | |
123 | <blockquote> | |
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 /> | |
131 | <br /> | |
132 | </blockquote> | |
133 | </li> | |
134 | <li> | |
135 | <p><a id="quest4" name="quest4">Can we use your software in our company? (We are | |
136 | not a GNU organization.)</a></p> | |
137 | <blockquote> | |
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 /> | |
140 | <br /> | |
141 | </blockquote> | |
142 | </li> | |
112c85fd | 143 | |
e63e0a4a | 144 | <li> |
145 | <p><a id="quest9" name="quest9">Which compilers does Splint support?</a></p> | |
146 | <blockquote> | |
147 | It is independent from your compiler.<br /> | |
148 | <br /> | |
149 | </blockquote> | |
150 | </li> | |
6252ab26 | 151 | |
e63e0a4a | 152 | <li> |
153 | <p><a id="quest5" name="quest5">Does Splint handle C++?</a></p> | |
154 | <blockquote> | |
155 | No. Splint handles ISO C99 (and some gcc extensions if +gnuextensions is used). | |
156 | We don't have the resources (or the research justification) to build a C++ | |
157 | front end, but if you are interested in building a C++ front end the source | |
158 | code is available, and I will certainly be willing to help.<br /> | |
159 | <br /> | |
160 | </blockquote> | |
161 | </li> | |
162 | <li> | |
163 | <p><a id="quest6" name="quest6">I downloaded the Splint .tgz file but can't | |
164 | figure out how to extract it. There is no 'z' option on the tar on my | |
165 | system.</a></p> | |
166 | <blockquote> | |
167 | Check to see if there is GNU tar on your system, it is usually invoked by the | |
168 | command gtar or gnutar. GNU tar supports the -z option.<br /> | |
169 | <br /> | |
170 | ||
171 | <p>You can also unzip the file then untar it. Do: gunzip filename.tar.gz to | |
172 | unzip then tar -xvf filename.tar</p> | |
173 | </blockquote> | |
174 | </li> | |
175 | <li> | |
176 | <p><a id="quest7" name="quest7">I want to use Splint in win2000. How do I do | |
177 | that?</a></p> | |
178 | <blockquote> | |
179 | See <a href="http://www.splint.org/">www.splint.org</a> for information on | |
180 | Splint.<br /> | |
181 | <br /> | |
182 | ||
183 | <p><a | |
184 | href="http://www.splint.org/win32.html">http://www.splint.org/win32.html</a> | |
185 | for Windows instructions.</p> | |
186 | </blockquote> | |
187 | </li> | |
188 | <li> | |
189 | <p><a id="quest8" name="quest8">I have installed Splint for Windows 2000. Where | |
190 | should I put the ".splintrc" file?</a></p> | |
191 | <blockquote> | |
192 | For Win32, Splint looks for splint.rc instead of .splintrc due to the DOS | |
193 | filename problems. It will look first in the current directory, then in<br /> | |
194 | <br /> | |
195 | ||
196 | <p>your home directory. See the Splint manual for more information.</p> | |
197 | </blockquote> | |
198 | </li> | |
199 | <h4>Usage</h4> | |
6252ab26 | 200 | |
e63e0a4a | 201 | <li> |
202 | <p><a id="quest10" name="quest10">How does Splint handle const?</a></p> | |
203 | <blockquote> | |
204 | Splint doesn't interpret const (at all). See the manual section on modifies | |
205 | checking (<a | |
206 | href="http://www.splint.org/manual/html/sec7.html">http://www.splint.org/manual/html/sec7.html</a>).<br /> | |
207 | <br /> | |
208 | </blockquote> | |
209 | </li> | |
210 | <li> | |
211 | <p><a id="quest11" name="quest11">Why do I get a Warning when multiplying | |
212 | different integer types? The C standard says this is ok. Why is this | |
213 | wrong?</a></p> | |
214 | <blockquote> | |
215 | There are lots of things that the C spec allows and defines clearly, that | |
216 | Splint will provide warnings for. It's not a question of it being "wrong", it's | |
217 | a matter of it being likely to reveal a programming mistake.<br /> | |
218 | <br /> | |
219 | </blockquote> | |
220 | </li> | |
221 | <li> | |
222 | <p><a id="quest12" name="quest12">The C standard says that what I'm doing is | |
223 | okay. Why does Splint give me a warning?</a></p> | |
224 | <blockquote> | |
225 | See the previous question.<br /> | |
226 | <br /> | |
227 | </blockquote> | |
228 | </li> | |
229 | <li> | |
230 | <p><a id="quest13" name="quest13">Splint complains if I ignore the return value | |
231 | of scanf but not printf?</a></p> | |
232 | <blockquote> | |
233 | This is just a strategic decision --- we view ignoring the result of a scanf to | |
234 | be more likely to reveal a problem with the code than ignoring the result of a | |
235 | printf, even though strict programmers will want to check printf also.<br /> | |
236 | <br /> | |
237 | ||
238 | <blockquote> | |
239 | If you want stricter checking, use the flags +ansistrictlib, +posixstrictlib, | |
240 | +unixstrictlib to select the strict versions of these libraries.<br /> | |
241 | <br /> | |
242 | </blockquote> | |
243 | </blockquote> | |
244 | </li> | |
245 | <li> | |
246 | <p><a id="quest14" name="quest14">I develop code on an embedded system with a | |
247 | compiler that uses nonstandard key words and data types. I would like to run | |
248 | Splint on my code but these nonstandard keywords cause parse errors. What should | |
249 | I do?</a></p> | |
250 | <blockquote> | |
251 | <p>You can often use -D to solve this problem.</p> | |
252 | <p>If you just want to ignore a keyword, you can add -Dnonstandardkeyword= to | |
253 | make the preprocessor eliminate the keyword, where nonstandardkeyword is the | |
254 | name of the keyword. Similarly, you can use -Dspecialtype=int to make a custom | |
255 | type parse as an int.</p> | |
256 | </blockquote> | |
257 | </li> | |
258 | <li> | |
259 | <p><a id="quest14b" name="quest14b">How can I get Splint to recognize directory | |
260 | trees and local source include directories? I've tried putting them in my path | |
261 | but it doesn't seem to look beyond the current directory.</a></p> | |
262 | <blockquote> | |
263 | You can use -I to set the include path like you would with a compiler.<br /> | |
264 | <br /> | |
265 | </blockquote> | |
266 | </li> | |
267 | <li> | |
268 | <p><a id="quest15" name="quest15">I heard that we will get lot of parse errors | |
269 | when we run this tool first time. Hence we need to modify source code. Is it | |
270 | correct ?</a></p> | |
271 | <blockquote> | |
272 | Usually not, but Splint doesn't support all C99 extensions.<br /> | |
273 | <br /> | |
274 | </blockquote> | |
275 | </li> | |
276 | <li> | |
277 | <p><a id="quest16" name="quest16">I heard that Splint can generate some spurious | |
278 | errors ( not genuine errors). Is it correct ?</a></p> | |
279 | <blockquote> | |
280 | Yes, please see <a href="http://www.splint.org/">www.splint.org</a> for | |
281 | details.<br /> | |
282 | <br /> | |
283 | </blockquote> | |
284 | </li> | |
285 | <li> | |
286 | <p><a id="quest17" name="quest17">When I build Splint I get the following | |
287 | error:</a></p> | |
288 | <blockquote> | |
289 | Checking for...<br /> | |
290 | <br /> | |
291 | ||
292 | <p>Checking manual...</p> | |
293 | <p>cmx > / Checking tests2.2...</p> | |
294 | <p>Checking tests2.4...</p> | |
295 | <p>Checking tests2.5...</p> | |
296 | <p>Checking db1...</p> | |
297 | <p>0a1,2</p> | |
298 | <p>> /cmx/tools/make -e clean</p> | |
299 | <p>> /cmx/tools/make -e check</p> | |
300 | <p>*** FAIL ***</p> | |
301 | <p>Checking db2...</p> | |
302 | <p>0a1,/tools/make -e clean</p> | |
303 | <p>> /cmx/tools/make -e check</p> | |
304 | <p>*** FAIL ***</p> | |
305 | <p>Checking db3...</p> | |
306 | </blockquote> | |
307 | <p>Should I be worried?</p> | |
308 | <blockquote> | |
309 | Those diffs look harmless. It is likely that your make is set up slightly | |
310 | differently than ours.<br /> | |
311 | <br /> | |
312 | </blockquote> | |
313 | </li> | |
314 | <li> | |
315 | <p><a id="quest18" name="quest18">I just installed Splint on a new machine. I get | |
316 | a bunch of errors during building when the test suite is run. When I look through | |
317 | the results, it seems like Splint is not reporting any errors in the code it | |
318 | analyzes. What is going on?</a></p> | |
319 | <blockquote> | |
320 | One possibility is that the installation directory where the test suite is | |
321 | running is on the system path (hence, splint won't report errors if | |
322 | -sysdirerrors is set, as it is by default). Try adding +sysdirerrors to the | |
323 | command line for the test suite to see if that is the problem, or installing | |
324 | Splint in a different directory not in the system path.<br /> | |
325 | <br /> | |
326 | </blockquote> | |
327 | </li> | |
328 | <li> | |
329 | <p><a id="quest18b" name="quest18b">I get parse errors when I try to run Splint | |
330 | on code like #define MACROdebug(...) blahblah . Can I use variadic macros in | |
331 | Splint?</a></p> | |
332 | <blockquote> | |
333 | Sorry, Splint does not yet support variadic macros. We hope to fix this in a | |
334 | future release.<br /> | |
335 | <br /> | |
336 | </blockquote> | |
337 | </li> | |
338 | <li> | |
339 | <p><a id="quest20" name="quest20">I use realloc in my code. How can I get Splint | |
340 | in check this code more effectively?</a></p> | |
341 | <blockquote> | |
342 | realloc has complicated semantics that make it difficult to use correctly. Make | |
343 | sure that you understand realloc and that you really need to use it.<br /> | |
344 | <br /> | |
345 | ||
346 | <p>If you decide to use realloc, we recommend that you wrapper it. The document | |
347 | Using Wrapper Functions explains how to do this. That document is included in | |
348 | the Splint documentation and is also available at:</p> | |
349 | <p><a | |
350 | href="http://www.splint.org/documentation/realloc.htm">http://www.splint.org/documentation/realloc.htm</a></p> | |
351 | </blockquote> | |
352 | </li> | |
353 | <li> | |
354 | <p><a id="quest21" name="quest21">I think I've found a bug in Splint. What should | |
355 | I do?</a></p> | |
356 | <blockquote> | |
357 | See <a | |
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 /> | |
360 | <br /> | |
361 | </blockquote> | |
362 | </li> | |
363 | <li> | |
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> | |
366 | <blockquote> | |
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 /> | |
369 | <br /> | |
370 | ||
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> | |
374 | </blockquote> | |
375 | </li> | |
376 | <li> | |
377 | <p><a id="quest23" name="quest23">My question isn't answered here. How can I get | |
378 | more information about Splint?</a></p> | |
379 | <blockquote> | |
380 | First check the Splint manual and the mailing list archives.<br /> | |
381 | <br /> | |
382 | ||
383 | <p>The Splint manual is available at: <a | |
384 | href="http://www.splint.org/manual/l">http://www.splint.org/manual/</a></p> | |
385 | <p>The mailing list archives are at:</p> | |
386 | <p><a | |
387 | href="http://www.mail-archive.com/lclint-interest@virginia.edu/u">http://www.mail-archive.com/lclint-interest%40virginia.edu/</a></p> | |
388 | <p>If you're still unable to find the information to answer your question, you | |
389 | can try posting the question to the splint-discuss mailing list (see <a | |
390 | href="http://www.splint.org/lists.html">http://www.splint.org/lists.html</a>)</p> | |
391 | <p>You can also email us at splint@splint.org.</p> | |
392 | </blockquote> | |
393 | </li> | |
394 | </ol> | |
395 | <!--#include virtual="footer.html"--> | |
112c85fd | 396 | </body> |
397 | </html> |