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