]> andersk Git - splint.git/blobdiff - doc/html/faq.html
Removed if statement with constant results
[splint.git] / doc / html / faq.html
index dd1561cca7d1d59eeb2deb826a40cf1a9974acac..cd3d1bcb441f0394b9cde52268bd90ee3a29ec40 100644 (file)
     <!--#include virtual="header.html"-->
     <h1>Splint - Frequently Asked Questions</h1>
     <h3>Index</h3>
-       
     <ol>
-    <a href="#genquest"><h4>General Questions About Splint</h4></a>
-      <li>
-        <a href="#quest1">
-        What is the difference between Splint and LCLint?</a><br />
+        <h4><a href="#genquest">General Questions About Splint</a></h4>
+      <li><a href="#quest1">What is the difference between Splint and LCLint?</a><br />
       </li>
       <li><a href="#quest2">What is the Splint logo?<br />
       </a></li>
       <li><a href="#quest4">Can we use your software in our company? (We are not a GNU
       organization.)<br />
       </a></li>
-            <li><a href="#quest9">Which compilers does Splint support?<br />
+      <li><a href="#quest9">Which compilers does Splint support?<br />
       </a></li>
       <li><a href="#quest5">Does Splint handle C++?<br />
       </a></li>
-
-      <a href="#install"><h4> Installation</h4></a>
+        <h4><a href="#install">Installation</a></h4>
+      </li>
       <li><a href="#quest6">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.<br />
       </a></li>
-      <li><a href="#quest7">I want to use Splint in win2000. How do I do that?<br />
+      <li><a href="#quest7">I want to use Splint in Windows. How do I do that?<br />
       </a></li>
       <li><a href="#quest8">I have installed Splint for Windows 2000. Where should I put
       the ".splintrc" file?<br />
       </a></li>
-            <li><a href="#quest17">When I build Splint I get the following errors.... Should I be worried?<br />
+      <li><a href="#quest17">When I build Splint I get the following errors.... Should I
+      be worried?<br />
       </a></li>
-       <li><a href="#quest18">I just installed Splint on a new machine. I get a bunch of
+      <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. When I look through the results,
       it seems like Splint is not reporting any errors in the code it analyzes. What is
       going on?<br />
       </a></li>
-      <a href="#usage"><h4>Usage</h4></a>
-           <li><a href="#quest15">I heard that we will get lot of parse errors when we run
+        <h4><a href="#usage">Usage</a></h4>
+      <li><a href="#quest15">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 ?<br />
       </a></li>
       <li><a href="#quest16">I heard that Splint can generate some spurious errors ( not
       </a></li>
       <li><a href="#quest10">How does Splint handle const?<br />
       </a></li>
-       <li><a href="#quest14">I develop code on an embedded system with a compiler that
+      <li><a href="#quest14">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?<br />
       </a></li>
       <li><a href="#quest14b">How can I get Splint to recognize directory trees and local
       source include directories?<br />
       </a></li>
-      
       <li><a href="#quest20">I use realloc in my code. How can I get Splint in check this
       code more effectively?<br />
       </a></li>
-                                  
-     <a href="#warnerror"><h4>Warnings and Errors</h4></a>
+        <h4><a href="#warnerror">Warnings and Errors</a></h4>
       <li><a href="#quest11">Why do I get a warning when multiplying different integer
       types? The C standard says this is ok. Why is this wrong?<br />
       </a></li>
       <li><a href="#quest18b">I get parse errors when I try to run Splint on code like
       #define MACROdebug(...) blahblah . Can I use variadic macros in Splint?<br />
       </a></li>
-      <a href="#bugs"><h4>Bugs</h4></a>
+        <h4><a href="#bugs">Bugs</a></h4>
       <li><a href="#quest21">I think I've found a bug in Splint. What should I do?<br />
-      </a></li>
-      <li><a href="#quest22">Splint tells me that there is a bug and I should report it.
+     </a></li>
+       <li><a href="#quest22">Splint tells me that there is a bug and I should report it.
       What information should I send?<br />
       </a></li>
-           <a href="#adinfo"> <h4>Additional Information</h4></a>
+               <h4><a href="#adinfo">Additional Information</a></h4>
       <li><a href="#quest23">My question isn't answered here. How can I get more
       information about Splint?<br />
       </a></li>
     </ol>
     <h3>Questions and Answers</h3>
     <ol>
-        <a id="genquest" name="genquest"><h4>General Questions About Splint</h4>
+        <h4><a id="genquest" name="genquest">General Questions About Splint</a></h4>
       <li>
         <p><a id="quest1" name="quest1">What is the difference between Splint and
         LCLint?</a></p>
           <br />
         </blockquote>
       </li>
-
-                 <li>
+      <li>
         <p><a id="quest9" name="quest9">Which compilers does Splint support?</a></p>
         <blockquote>
-          It is independent from your compiler.<br />
+          Splint is independent from your compiler.  It should be able to handle code written for any compiler as long as the code is C99 compliant. <br />
           <br />
         </blockquote>
       </li>
-
-                 <li>
+      <li>
         <p><a id="quest5" name="quest5">Does Splint handle C++?</a></p>
         <blockquote>
           No. Splint handles ISO C99 (and some gcc extensions if +gnuextensions is used).
           <br />
         </blockquote>
       </li>
-      <a id="install" name="install"><h4>Installation</h4>
+        <h4><a id="install" name="install">Installation</a></h4>
       <li>
         <p><a id="quest6" name="quest6">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
         </blockquote>
       </li>
       <li>
-        <p><a id="quest7" name="quest7">I want to use Splint in win2000. How do I do
+        <p><a id="quest7" name="quest7">I want to use Splint in Windows. How do I do
         that?</a></p>
         <blockquote>
-          See <a href="http://www.splint.org/">www.splint.org</a> for information on
-          Splint.<br />
+          See <a href="http://splint.org/win32.html/">http://splint.org/win32.html</a> for instructions on obtaining and installing Splint on Windows.<br />
           <br />
-           
-          <p><a
-          href="http://www.splint.org/win32.html">http://www.splint.org/win32.html</a>
-          for Windows instructions.</p>
-        </blockquote>
+       </blockquote>
       </li>
       <li>
         <p><a id="quest8" name="quest8">I have installed Splint for Windows 2000. Where
         should I put the ".splintrc" file?</a></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<br />
-          <br />
-           
-          <p>your home directory. See the Splint manual for more information.</p>
+          filename problems. It will look first in the current directory, then in           
+          your home directory. See the Splint manual for more information.<br / >
         </blockquote>
       </li>
-      
       <li>
         <p><a id="quest17" name="quest17">When I build Splint I get the following
         error:</a></p>
           <br />
         </blockquote>
       </li>
-           <a id="usage" name="usage"><h4>Usage</h4>
-  <li>
+        <h4><a id="usage" name="usage">Usage</a></h4>
+      <li>
         <p><a id="quest15" name="quest15">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 ?</a></p>
         <blockquote>
-          Usually not, but Splint doesn't support all C99 extensions.<br />
+        Usually not.<br />
+       Parse errors usually occur in code written for compilers that use nonstandard keywords. (See the <a href="#quest14">question</a> on using Splint for code development on embedded systems.)<br />
+
+       If you're getting parse errors make sure that the required libraries are included by using the +posixlib or +unixlib flags.  If you're using nonstandard gnu extensions the +gnuextensions flag make be helpful.<br />
+
+       However, Splint doesn't yet support all C99 extensions so there are some legitimate C programs that will need to be modified.<br />
           <br />
         </blockquote>
       </li>
         <p><a id="quest16" name="quest16">I heard that Splint can generate some spurious
         errors ( not genuine errors). Is it correct ?</a></p>
         <blockquote>
-          Yes, please see <a href="http://www.splint.org/">www.splint.org</a> for
-          details.<br />
-          <br />
+
+          Yes.  Many of the program properties that Splint checks are undecidable.  This means that any static analysis tool that can be run on real programs will either produce false positives or false negatives. Because
+of this and to improve efficiency, Splint makes some simplifying assumptions.  This means
+that Splint will occasionally produce spurious warnings or miss real errors.<br />
+
+However, often spurious errors can be fixed by adding additional annotations.<br />
         </blockquote>
       </li>
       <li>
           <br />
         </blockquote>
       </li>
-          <li>
+      <li>
         <p><a id="quest14" name="quest14">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
           <br />
         </blockquote>
       </li>
-       <li>
+      <li>
         <p><a id="quest20" name="quest20">I use realloc in my code. How can I get Splint
         in check this code more effectively?</a></p>
         <blockquote>
           href="http://www.splint.org/documentation/realloc.htm">http://www.splint.org/documentation/realloc.htm</a></p>
         </blockquote>
       </li>
-         <a id="warnerror" name="warnerror"><h4>Warnings and Errors</h4>
+        <h4><a id="warnerror" name="warnerror">Warnings and Errors</a></h4>
       <li>
         <p><a id="quest11" name="quest11">Why do I get a Warning when multiplying
         different integer types? The C standard says this is ok. Why is this
           </blockquote>
         </blockquote>
       </li>
-    <li><p><a id="quest18b" name="quest18b">I get parse errors when I try to run Splint
+      <li>
+        <p><a id="quest18b" name="quest18b">I get parse errors when I try to run Splint
         on code like #define MACROdebug(...) blahblah . Can I use variadic macros in
         Splint?</a></p>
         <blockquote>
           <br />
         </blockquote>
       </li>
-
-     <a id="bugs" name="bugs"><h4>Bugs</h4>
+        <h4><a id="bugs" name="bugs">Bugs</a></h4>
       <li>
         <p><a id="quest21" name="quest21">I think I've found a bug in Splint. What should
         I do?</a></p>
           may be able to at least to offer you advice on working around the problem.</p>
         </blockquote>
       </li>
-     <a id="adinfo" name="adinfo"><h4>Additional Information</h4>
+        <h4><a id="adinfo" name="adinfo">Additional Information</a></h4>
       <li>
         <p><a id="quest23" name="quest23">My question isn't answered here. How can I get
         more information about Splint?</a></p>
This page took 0.075433 seconds and 4 git commands to generate.