]> andersk Git - splint.git/blob - doc/faq.txt
Added the FAQ and a document on using realloc to CVS.
[splint.git] / doc / faq.txt
1
2 Can we use your software in our company?  (We are not a GNU organization.)
3
4 Yes, splint is GPL-licensed.  Anyone may use it.  If you want to
5 redistribute it, check the license for details or contact us.
6
7 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.
8
9 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.
10
11 You can also unzip the file then untar it.  Do: gunzip filename.tar.gz to unzip then tar -xvf filename.tar
12
13 I want to use Splint in win2000.  How do I do that?
14
15 See www.splint.org for information on Splint.
16 http://www.splint.org/win32.html for Windows instructions.
17
18  I have installed Splint for Windows 2000.  Where should I put the ".splintrc" file?
19
20  For Win32, Splint looks for splint.rc instead of .splintrc due to the DOS
21 filename problems.  It will look first in the current directory, then in
22 your home directory.  See the Splint manual for more information.
23
24 What are all the compilers Splint can support ?
25
26 It is independent from your compiler.
27
28
29 How does Splint handle const?
30
31 Splint doesn't interpret const (at all).  See the manual section on
32 modifies checking (http://www.splint.org/manual/html/sec7.html).
33
34 Why do I get a warning when multiplying different integer types?  The C standard says this is ok.  Why is this wrong?
35
36 There are lots of things that the C spec allows and defines clearly, that 
37 Splint will provide warnings for.  It's not a question of it being "wrong",
38 it's a matter of it being likely to reveal a programming mistake.
39
40 The C standard says that what I'm doing is okay. Why does Splint give me a warning?
41
42 See the previous question.
43
44 Splint complains if I ignore the return value of scanf but not printf?
45
46 This is just a strategic decision --- we view ignoring the result of a
47 scanf to be more likely to reveal a problem with the code than ignoring
48 the result of a printf, even though strict programmers will want to check
49 printf also.
50
51 If you want stricter checking use the flags  +ansistrictlib, +posixstrictlib, +unixstrictlib to select the strict versions of these libraries.
52
53 I develop code on an embedded system with a compiler that uses nonstandard key words and data types.  I would like run Splint on my code but these nonstandard keywords cause parse errors.  What should I do?
54
55 You can often use -D to solve this problem.
56
57 If you just want to ignore a keyword, you can add
58
59 -Dnonstandardkeyword=
60
61 to make the preprocessor eliminate the keyword, where nonstandardkeyword is the name of the keyword.  Similarly, you can use
62 -Dspecialtype=int
63 to make a custom type parse as an int.
64
65 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.
66
67 You can use -I to set the include path like you would with a compiler.
68
69 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 ?
70
71 It depends, splint doesn't support all C99 extensions.
72
73 I heard that Splint can generate some spurious errors ( not genuine errors).  Is it correct ?
74
75 Yes, please see www.splint.org for details.
76
77 When I build Splint I get the following error:
78
79  Checking for...
80  Checking manual...
81 cmx   > / Checking tests2.2...
82  Checking tests2.4...
83  Checking tests2.5...
84  Checking db1...
85  0a1,2
86  > /cmx/tools/make -e clean
87  > /cmx/tools/make -e check
88  *** FAIL ***
89  Checking db2...
90  0a1,/tools/make -e clean
91  > /cmx/tools/make -e check
92  *** FAIL ***
93  Checking db3...
94
95 Should I be worried?
96  
97 Those diffs look harmless.  It is likely that your make is set up slightly differently than ours.
98
99 I just installed Splint on a new machine.  I get a bunch of errors in the test suite.  When I look through the results, it seems like Splint is not reporting any errors in the code it analyzes.  What is going on?
100
101 One possibility is that the installation directory where the test suite is
102 running is on the system path (hence, splint won't report errors if
103 -sysdirerrors is set, as it is by default).  Try adding +sysdirerrors to
104 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.
105
106
107 I get parse errors when I try to run Splint on code like #define MACROdebug(...) blahblah .  Can I use variadic macros in Splint?
108
109 Sorry, Splint doesn't yet support variadic macros. We hope to fix this in a future release.
110
111 I use realloc in my code how can I get Splint in check this code more effectively?
112
113 realloc has complicated semantics that make it difficult to use correctly.  Make sure that you understand realloc and that you need to use it.
114
115 If you decide to use realloc we recommend that you wrapper it.  The document using wrapper functions explains how to do this.  That doucment is included in the Splint documentation and is also available at:
116 HTTP://INSERT_A_VALID_URL_WHEN_THE_document_is_ready.
117
118 I think I've found a bug in Splint what should I do?
119
120 See http://www.splint.org/bugs.html for a list of known bugs and instructions on reporting bugs.
121
122 Splint tells me that there is a bug and I should report it.  What information should I send?
123
124 Ideally we would like enough code to reproduce the problem.  Small snipits of code which trigger the bug are the best.
125
126 If we're not able to reproduce the problem than we are unlikely to be able to patch Splint.  However, we would still appreciate hearing about the bug and may be able at least to offer you advice on working around the problem.
127
128 My question isn't answered here.  How can I get more information about Splint?
129
130 First check the Splint manual and the mailing list archives.
131
132 The Splint manual is available at: http://www.splint.org/manual/
133 The mailing list archives are at:
134 http://www.mail-archive.com/lclint-interest%40virginia.edu/
135
136 If you're still unable to find the information to answer your question, you can try posting your question to the splint-discuss mailing list (see http://www.splint.org/lists.html)
137
138 You can also email us at splint@splint.org.
This page took 0.04559 seconds and 5 git commands to generate.