]> andersk Git - splint.git/blob - doc/faq.txt
f52de36e2e558d791a292a6d07a803aa9de5a7de
[splint.git] / doc / faq.txt
1 What is the difference between Splint and LCLint?\r
2 \r
3 Before 2002, Splint was known as LCLint. Splint 3.0 is the successor to LCLint 2.5.\r
4 \r
5 LCLint was originally named for LCL, the Larch C Interface Language and lint, a well-known C program checking tool. Because our tool has diverged from LCL, and our focus now is on secure programming, it was renamed Splint. Splint's name has (at least) three interpretations: specifications lint, secure programming lint, and first aid for programmers. It's also easier to pronounce than LCLint.\r
6 \r
7 What is the Splint logo?\r
8 \r
9 Thomas Jefferson's Serpentine Walls at the University of Virginia. The walls are one brick thick, but because of their design are both strong and aesthetic. Like a secure program, secure walls depend on sturdy bricks, solid construction, and elegant and principled design.\r
10 \r
11 Can I include Splint in my software distribution?\r
12 \r
13 Yes. Splint is licensed under the GNU General Public License. You may redistribute it as you wish so long as credits and pointers to www.splint.org are not changed or removed. Splint may be included in commercial distributions, and is included in several Linux and freeware CDs. If you redistribute Splint, please let us know by sending a message to splint@cs.virginia.edu.\r
14 \r
15 Can we use your software in our company?  (We are not a GNU organization.)\r
16 \r
17 Yes, splint is GPL-licensed.  Anyone may use it.  If you want to\r
18 redistribute it, check the license for details or contact us.\r
19 \r
20 Does Splint handle C++?\r
21 \r
22 No. Splint handles ISO C99 (and some gcc extensions if +gnuextensions is used). We don't have the resources (or the research justification) to build a C++ front end, but if you are interested in building a C++ front end the source code is available, and I will certainly be willing to help.\r
23 \r
24 I downloaded the Splint .tgz file but can't figure out how to extract it.  There is no 'z' option on the tar on my system.\r
25 \r
26 Check to see if there is GNU tar on your system, it is usually invoked by the command gtar or gnutar.  GNU tar supports the -z option.\r
27 \r
28 You can also unzip the file then untar it.  Do: gunzip filename.tar.gz to unzip then tar -xvf filename.tar\r
29 \r
30 I want to use Splint in win2000.  How do I do that?\r
31 \r
32 See www.splint.org for information on Splint.\r
33 http://www.splint.org/win32.html for Windows instructions.\r
34 \r
35 I have installed Splint for Windows 2000.  Where should I put the ".splintrc" file?\r
36 \r
37  For Win32, Splint looks for splint.rc instead of .splintrc due to the DOS\r
38 filename problems.  It will look first in the current directory, then in\r
39 your home directory.  See the Splint manual for more information.\r
40 \r
41 Which compilers does Splint support?\r
42 \r
43 It is independent from your compiler.\r
44 \r
45 How does Splint handle const?\r
46 \r
47 Splint doesn't interpret const (at all).  See the manual section on\r
48 modifies checking (http://www.splint.org/manual/html/sec7.html).\r
49 \r
50 Why do I get a warning when multiplying different integer types?  The C standard says this is ok.  Why is this wrong?\r
51 \r
52 There are lots of things that the C spec allows and defines clearly, that \r
53 Splint will provide warnings for.  It's not a question of it being "wrong",\r
54 it's a matter of it being likely to reveal a programming mistake.\r
55 \r
56 The C standard says that what I'm doing is okay. Why does Splint give me a warning?\r
57 \r
58 See the previous question.\r
59 \r
60 Splint complains if I ignore the return value of scanf but not printf?\r
61 \r
62 This is just a strategic decision --- we view ignoring the result of a\r
63 scanf to be more likely to reveal a problem with the code than ignoring\r
64 the result of a printf, even though strict programmers will want to check\r
65 printf also.\r
66 \r
67 If you want stricter checking, use the flags  +ansistrictlib, +posixstrictlib, +unixstrictlib to select the strict versions of these libraries.\r
68 \r
69 I develop code on an embedded system with a compiler that uses nonstandard key words and data types.  I would like to run Splint on my code but these nonstandard keywords cause parse errors.  What should I do?\r
70 \r
71 You can often use -D to solve this problem.\r
72 \r
73 If you just want to ignore a keyword, you can add\r
74 \r
75 -Dnonstandardkeyword=\r
76 \r
77 to make the preprocessor eliminate the keyword, where nonstandardkeyword is the name of the keyword.  Similarly, you can use\r
78 -Dspecialtype=int\r
79 to make a custom type parse as an int.\r
80 \r
81 How can I get Splint to recognize directory trees and local source include directories?  I've tried putting them in my path but it doesn't seem to look beyond the current directory.\r
82 \r
83 You can use -I to set the include path like you would with a compiler.\r
84 \r
85 I heard that we will get lot of parse errors when we run this tool first time. Hence we need to modify source code. Is it correct ?\r
86 \r
87 Usually not, but Splint doesn't support all C99 extensions.\r
88 \r
89 I heard that Splint can generate some spurious errors ( not genuine errors).  Is it correct ?\r
90 \r
91 Yes, please see www.splint.org for details.\r
92 \r
93 When I build Splint I get the following error:\r
94 \r
95  Checking for...\r
96  Checking manual...\r
97 cmx   > / Checking tests2.2...\r
98  Checking tests2.4...\r
99  Checking tests2.5...\r
100  Checking db1...\r
101  0a1,2\r
102  > /cmx/tools/make -e clean\r
103  > /cmx/tools/make -e check\r
104  *** FAIL ***\r
105  Checking db2...\r
106  0a1,/tools/make -e clean\r
107  > /cmx/tools/make -e check\r
108  *** FAIL ***\r
109  Checking db3...\r
110 \r
111 Should I be worried?\r
112  \r
113 Those diffs look harmless.  It is likely that your make is set up slightly differently than ours.\r
114 \r
115 I just installed Splint on a new machine.  I get a bunch of errors during building when the test suite is run.  When I look through the results, it seems like Splint is not reporting any errors in the code it analyzes.  What is going on?\r
116 \r
117 One possibility is that the installation directory where the test suite is\r
118 running is on the system path (hence, splint won't report errors if\r
119 -sysdirerrors is set, as it is by default).  Try adding +sysdirerrors to\r
120 the command line for the test suite to see if that is the problem, or installing Splint in a different directory not in the system path.\r
121 \r
122 I get parse errors when I try to run Splint on code like #define MACROdebug(...) blahblah .  Can I use variadic macros in Splint?\r
123 \r
124 Sorry, Splint doesn't yet support variadic macros. We hope to fix this in a future release.\r
125 \r
126 I use realloc in my code.  How can I get Splint in check this code more effectively?\r
127 \r
128 realloc has complicated semantics that make it difficult to use correctly.  Make sure that you understand realloc and that you really need to use it.\r
129 \r
130 If you decide to use realloc, we recommend that you wrapper it.  The document Using Wrapper Functions explains how to do this.  That document is included in the Splint documentation and is also available at:\r
131 http://www.splint.org/documentation/realloc.htm\r
132 \r
133 I think I've found a bug in Splint.  What should I do?\r
134 \r
135 See http://www.splint.org/bugs.html for a list of known bugs and instructions on reporting bugs.\r
136 \r
137 Splint tells me that there is a bug and I should report it.  What information should I send?\r
138 \r
139 Ideally we would like enough code to reproduce the problem.  Small snippets of code which trigger the bug are the best but more code is also acceptable.\r
140 \r
141 If we're not able to reproduce the problem, then we are unlikely to be able to patch Splint.  However, we would still appreciate hearing about the bug and may be able to at least to offer you advice on working around the problem.\r
142 \r
143 My question isn't answered here.  How can I get more information about Splint?\r
144 \r
145 First check the Splint manual and the mailing list archives.\r
146 \r
147 The Splint manual is available at: http://www.splint.org/manual/\r
148 The mailing list archives are at:\r
149 http://www.mail-archive.com/lclint-interest%40virginia.edu/\r
150 \r
151 If you're still unable to find the information to answer your question, you can try posting the question to the splint-discuss mailing list (see http://www.splint.org/lists.html)\r
152 \r
153 You can also email us at splint@splint.org.\r
This page took 0.080873 seconds and 3 git commands to generate.