Jim Brooks
http://www.jimbrooks.org/tools/
2003/09/30

"lwlint" (light-weight lint) is a lint tool that catches some programming
mistakes in C/C++ (some of which gcc won't catch even with -Wall)
such as dangling "else", incorrect "else if" series, use of octal constants,
declaring pointers and non-pointers in one statement, etc.
The source code should compile on a system with GNU tools (make/gcc/flex/bison).

C++ source files can be passed to lwlint but it doesn't yet check for
any C++ specific lint.

See lwlint --help for how to enable or disable various kinds of warnings.
By default, a few less useful (nuisance) warnings are disabled such as -multidecl.
Pass -all to enable all warnings.  Or pass -none followed by +warning args
to selectively enable certain warnings.

If lwlint warns about a line of source code, but you're sure it's OK,
you can suppress the warning for that particular line by writing a comment
containing @lint at the end of that line.  For example, to tell lwlint that
this use of an octal constant is OK:

   id = msgget( IPC_PRIVATE, 0600 ); /*@lint*/

If a "bad else/if series" warning is reported but you're sure it's OK,
you can suppress the warning by placing an empty line, eg:

   if ( x == 0 )
      foo();
   else if ( x == 1 )
      bar();
                << empty line to separate >>
   if ( y )
      exit();


Legal
=====

This is "copy-left software" that is distributed with, protected by,
and licensed under the GNU General Public License (see "LICENSE.txt").
This software is provided "AS-IS" without any express or implied warranty nor guarantee.
In no event will the author be held liable for any damages arising from
the use of this software nor derivative works.
