]>
Commit | Line | Data |
---|---|---|
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 | |
6 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
7 | <title>Splint FAQ</title> | |
8 | <head> | |
9 | <meta name="generator" | |
10 | content="HTML Tidy for Linux/x86 (vers 1st November 2002), see www.w3.org" /> | |
11 | <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8" /> | |
12 | <title></title> | |
112c85fd | 13 | </head> |
14 | <body lang="en-US"> | |
15 | <h1>Splint frequently asked questions</h1> | |
16 | ||
17 | <h3>Index</h3><ol><li><a href="#quest1"><p>What is the difference between Splint and LCLint?</p> | |
18 | </a></li> | |
19 | <p><li><a href="#quest2">What is the Splint logo?</p> | |
20 | </a></li> | |
21 | <p><li><a href="#quest3">Can I include Splint in my software distribution?</p> | |
22 | </a></li> | |
23 | <p><li><a href="#quest4">Can we use your software in our company? (We are not a GNU organization.)</p> | |
24 | </a></li> | |
25 | <p><li><a href="#quest5">Does Splint handle C++?</p> | |
26 | </a></li> | |
27 | <p><li><a href="#quest6">I downloaded the Splint .tgz file but can't figure out how to extract it. | |
28 | There is no 'z' option on the tar on my system.</p> | |
29 | </a></li> | |
30 | <p><li><a href="#quest7">I want to use Splint in win2000. How do I do that?</p> | |
31 | </a></li> | |
32 | <p><li><a href="#quest8">I have installed Splint for Windows 2000. Where should I put the ".splintrc" | |
33 | file?</p> | |
34 | </a></li> | |
35 | <p><li><a href="#quest9">Which compilers does Splint support?</p> | |
36 | </a></li> | |
37 | <p><li><a href="#quest10">How does Splint handle const?</p> | |
38 | </a></li> | |
39 | <p><li><a href="#quest11">Why do I get a warning when multiplying different integer types? The C | |
40 | standard says this is ok. Why is this wrong?</p> | |
41 | </a></li> | |
42 | <p><li><a href="#quest12">The C standard says that what I'm doing is okay. Why does Splint give me a | |
43 | warning?</p> | |
44 | </a></li> | |
45 | <p><li><a href="#quest13">Splint complains if I ignore the return value of scanf but not printf?</p> | |
46 | </a></li> | |
47 | <p><li><a href="#quest14">I develop code on an embedded system with a compiler that uses nonstandard key | |
48 | words and data types. I would like to run Splint on my code but these nonstandard | |
49 | keywords cause parse errors. What should I do?</p> | |
50 | </a></li> | |
51 | <p><li><a href="#quest14b">How can I get Splint to recognize directory trees and local source include | |
52 | directories?</p> | |
53 | </a></li> | |
54 | <p><li><a href="#quest15">I heard that we will get lot of parse errors when we run this tool first time. | |
55 | Hence we need to modify source code. Is it correct ?</p> | |
56 | </a></li> | |
57 | <p><li><a href="#quest16">I heard that Splint can generate some spurious errors ( not genuine errors). | |
58 | Is it correct ?</p> | |
59 | </a></li> | |
60 | <p><li><a href="#quest17">When I build Splint I get the following errors.... Should I be worried?</p> | |
61 | </a></li> | |
62 | <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. | |
63 | When I look through the results, it seems like Splint is not reporting any errors in the code it analyzes. What is going on? | |
64 | </p> | |
65 | </a></li> | |
66 | <p><li><a href="#quest18b">I get parse errors when I try to run Splint on code like #define | |
67 | MACROdebug(...) blahblah . Can I use variadic macros in Splint?</p> | |
68 | </a></li> | |
69 | <p><li><a href="#quest20">I use realloc in my code. How can I get Splint in check this code more | |
70 | effectively?</p> | |
71 | </a></li> | |
72 | <p><li><a href="#quest21">I think I've found a bug in Splint. What should I do?</p> | |
73 | </a></li> | |
74 | <p><li><a href="#quest22">Splint tells me that there is a bug and I should report it. What information | |
75 | should I send?</p> | |
76 | </a></li> | |
77 | <p><li><a href="#quest23">My question isn't answered here. How can I get more information about | |
78 | Splint?</p> | |
79 | </a></li> | |
80 | </ol> | |
81 | ||
82 | <h3>Questions and Answers</h3> | |
83 | <ol> | |
84 | ||
85 | <li><p><a name="quest1">What is the difference between Splint and LCLint?</p> | |
86 | <p>Before 2002, Splint was known as LCLint. Splint 3.0 is the successor to LCLint | |
87 | 2.5.</p> | |
88 | ||
89 | <p><blockquote>LCLint was originally named for LCL, the Larch C Interface Language and lint, a | |
90 | well-known C program checking tool. Because our tool has diverged from LCL, and our | |
91 | focus now is on secure programming, it was renamed Splint. Splint's name has (at | |
92 | least) three interpretations: specifications lint, secure programming lint, and first | |
93 | aid for programmers. It's also easier to pronounce than LCLint.</p></blockquote> | |
94 | <li><p><a name="quest2">What is the Splint logo?</p> | |
95 | <p><blockquote>Thomas Jefferson's Serpentine Walls at the University of Virginia. The walls are | |
96 | one brick thick, but because of their design are both strong and aesthetic. Like a | |
97 | secure program, secure walls depend on sturdy bricks, solid construction, and elegant | |
98 | and principled design.</p></blockquote> | |
99 | <li><p><a name="quest3">Can I include Splint in my software distribution?</p> | |
100 | <p><blockquote>Yes. Splint is licensed under the GNU General Public License. You may redistribute | |
101 | it as you wish so long as credits and pointers to <a | |
102 | href="http://www.splint.org/">www.splint.org</a> are not changed or removed. Splint | |
103 | may be included in commercial distributions, and is included in several Linux and | |
104 | freeware CDs. If you redistribute Splint, please let us know by sending a message to | |
105 | <a href="mailto:splint@cs.virginia.edu">splint@cs.virginia.edu</a>.</p></blockquote> | |
106 | <li><p><a name="quest4">Can we use your software in our company? (We are not a GNU organization.)</p> | |
107 | <p><blockquote>Yes, splint is GPL-licensed. Anyone may use it. If you want to | |
108 | redistribute it, check the license for details or contact us.</p></blockquote> | |
109 | <li><p><a name="quest5">Does Splint handle C++?</p> | |
110 | <p><blockquote>No. Splint handles ISO C99 (and some gcc extensions if +gnuextensions is used). We | |
111 | don't have the resources (or the research justification) to build a C++ front end, | |
112 | but if you are interested in building a C++ front end the source code is available, | |
113 | and I will certainly be willing to help.</p></blockquote> | |
114 | <li><p><a name="quest6">I downloaded the Splint .tgz file but can't figure out how to extract it. There is | |
115 | no 'z' option on the tar on my system.</p> | |
116 | <p><blockquote>Check to see if there is GNU tar on your system, it is usually invoked by the | |
117 | command gtar or gnutar. GNU tar supports the -z option.</p> | |
118 | <p>You can also unzip the file then untar it. Do: gunzip filename.tar.gz to unzip | |
119 | then tar -xvf filename.tar</p></blockquote> | |
120 | <li><p><a name="quest7">I want to use Splint in win2000. How do I do that?</p> | |
121 | <p><blockquote>See <a href="http://www.splint.org/">www.splint.org</a> for information on | |
122 | Splint.</p> | |
123 | <p><a href="http://www.splint.org/win32.html">http://www.splint.org/win32.html</a> | |
124 | for Windows instructions.</p></blockquote> | |
125 | <li><p><a name="quest8">I have installed Splint for Windows 2000. Where should I put the ".splintrc" | |
126 | file?</p> | |
127 | <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> | |
128 | <p>your home directory. See the Splint manual for more information.</p> | |
129 | </blockquote> | |
130 | <li><p><a name="quest9">Which compilers does Splint support?</p> | |
131 | <p><blockquote>It is independent from your compiler.</p></blockquote> | |
132 | <li><p><a name="quest10">How does Splint handle const?</p> | |
133 | <p><blockquote>Splint doesn't interpret const (at all). See the manual section on | |
134 | modifies checking (<a href="http://www.splint.org/manual/html/sec7.html">http://www.splint.org/manual/html/sec7.html</a>).</p></blockquote> | |
135 | <li><p><a name="quest11">Why do I get a Warning when multiplying different integer types? The C standard | |
136 | says this is ok. Why is this wrong?</p> | |
137 | <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", | |
138 | it's a matter of it being likely to reveal a programming mistake.</p></blockquote> | |
139 | <li><p><a name="quest12">The C standard says that what I'm doing is okay. Why does Splint give me a | |
140 | warning?</p> | |
141 | <p><blockquote>See the previous question.</p></blockquote> | |
142 | <li><p><a name="quest13">Splint complains if I ignore the return value of scanf but not printf?</p> | |
143 | <p><blockquote>This is just a strategic decision --- we view ignoring the result of a | |
144 | scanf to be more likely to reveal a problem with the code than ignoring | |
145 | the result of a printf, even though strict programmers will want to check | |
146 | printf also.</p> | |
147 | <p><blockquote>If you want stricter checking, use the flags +ansistrictlib, +posixstrictlib, | |
148 | +unixstrictlib to select the strict versions of these libraries.</p></blockquote> | |
149 | </blockquote> | |
150 | <li><p><a name="quest14">I develop code on an embedded system with a compiler that uses nonstandard key | |
151 | words and data types. I would like to run Splint on my code but these nonstandard | |
152 | keywords cause parse errors. What should I do?</p> | |
153 | ||
154 | <blockquote><p>You can often use -D to solve this problem.</p> | |
155 | <p>If you just want to ignore a keyword, you can add | |
156 | -Dnonstandardkeyword= | |
157 | to make the preprocessor eliminate the keyword, where nonstandardkeyword is the | |
158 | name of the keyword. Similarly, you can use | |
159 | -Dspecialtype=int | |
160 | to make a custom type parse as an int.</p></blockquote> | |
161 | <li><p><a name="quest14b">How can I get Splint to recognize directory trees and local source include | |
162 | directories? I've tried putting them in my path but it doesn't seem to look beyond | |
163 | the current directory.</p> | |
164 | <p><blockquote>You can use -I to set the include path like you would with a compiler.</p></blockquote> | |
165 | <li><p><a name="quest15">I heard that we will get lot of parse errors when we run this tool first time. | |
166 | Hence we need to modify source code. Is it correct ?</p> | |
167 | <p><blockquote>Usually not, but Splint doesn't support all C99 extensions.</p></blockquote> | |
168 | <li><p><a name="quest16">I heard that Splint can generate some spurious errors ( not genuine errors). Is it | |
169 | correct ?</p> | |
170 | <p><blockquote>Yes, please see <a href="http://www.splint.org/">www.splint.org</a> for | |
171 | details.</p></blockquote> | |
172 | <li><p><a name="quest17">When I build Splint I get the following error:</p> | |
173 | <p><blockquote>Checking for...</p> | |
174 | <p>Checking manual...</p> | |
175 | <p>cmx > / Checking tests2.2...</p> | |
176 | <p>Checking tests2.4...</p> | |
177 | <p>Checking tests2.5...</p> | |
178 | <p>Checking db1...</p> | |
179 | <p>0a1,2</p> | |
180 | <p>> /cmx/tools/make -e clean</p> | |
181 | <p>> /cmx/tools/make -e check</p> | |
182 | <p>*** FAIL ***</p> | |
183 | <p>Checking db2...</p> | |
184 | <p>0a1,/tools/make -e clean</p> | |
185 | <p>> /cmx/tools/make -e check</p> | |
186 | <p>*** FAIL ***</p> | |
187 | <p>Checking db3...</p> | |
188 | </blockquote> | |
189 | <p>Should I be worried?</p> | |
190 | </blockquote> | |
191 | <p><blockquote>Those diffs look harmless. It is likely that your make is set up slightly | |
192 | differently than ours.</p></blockquote> | |
193 | <li><p><a name="quest18">I just installed Splint on a new machine. I get a bunch of errors during building | |
194 | when the test suite is run. When I look through the results, it seems like Splint is | |
195 | not reporting any errors in the code it analyzes. What is going on?</p> | |
196 | <p><blockquote>One possibility is that the installation directory where the test suite is | |
197 | running is on the system path (hence, splint won't report errors if | |
198 | -sysdirerrors is set, as it is by default). Try adding +sysdirerrors to | |
199 | the command line for the test suite to see if that is the problem, or installing | |
200 | Splint in a different directory not in the system path.</p></blockquote> | |
201 | <li><p><a name="quest18b">I get parse errors when I try to run Splint on code like #define MACROdebug(...) | |
202 | blahblah . Can I use variadic macros in Splint?</p> | |
203 | <p><blockquote>Sorry, Splint does not yet support variadic macros. We hope to fix this in a | |
204 | future release.</p></blockquote> | |
205 | <li><p><a name="quest20">I use realloc in my code. How can I get Splint in check this code more | |
206 | effectively?</p> | |
207 | <p><blockquote>realloc has complicated semantics that make it difficult to use correctly. Make | |
208 | sure that you understand realloc and that you really need to use it.</p> | |
209 | <p>If you decide to use realloc, we recommend that you wrapper it. The document Using | |
210 | Wrapper Functions explains how to do this. That document is included in the Splint | |
211 | documentation and is also available at:</p> | |
212 | <p><a | |
213 | href="http://www.splint.org/documentation/realloc.htm">http://www.splint.org/documentation/realloc.htm</a></p></blockquote> | |
214 | <li><p><a name="quest21">I think I've found a bug in Splint. What should I do?</p> | |
215 | <p><blockquote>See <a href="http://www.splint.org/bugs.html">http://www.splint.org/bugs.html</a> | |
216 | for a list of known bugs and instructions on reporting bugs.</p></blockquote> | |
217 | <li><p><a name="quest22">Splint tells me that there is a bug and I should report it. What information | |
218 | should I send?</p> | |
219 | <p><blockquote>Ideally we would like enough code to reproduce the problem. Small snippets of code | |
220 | which trigger the bug are the best but more code is also acceptable.</p> | |
221 | <p>If we're not able to reproduce the problem, then we are unlikely to be able to | |
222 | patch Splint. However, we would still appreciate hearing about the bug and may be | |
223 | able to at least to offer you advice on working around the problem.</p></blockquote> | |
224 | <li><p><a name="quest23">My question isn't answered here. How can I get more information about Splint?</p> | |
225 | <p><blockquote>First check the Splint manual and the mailing list archives.</p> | |
226 | <p>The Splint manual is available at: <a | |
227 | href="http://www.splint.org/manual/l">http://www.splint.org/manual/</a></p> | |
228 | <p>The mailing list archives are at:</p> | |
229 | <p><a | |
230 | href="http://www.mail-archive.com/lclint-interest@virginia.edu/u">http://www.mail-archive.com/lclint-interest%40virginia.edu/</a></p> | |
231 | <p>If you're still unable to find the information to answer your question, you can | |
232 | try posting the question to the splint-discuss mailing list (see <a | |
233 | href="http://www.splint.org/lists.html">http://www.splint.org/lists.html</a>)</p> | |
234 | <p>You can also email us at splint@splint.org.</p> | |
235 | </blockquote> | |
236 | </body> | |
237 | </html> |