summaryrefslogtreecommitdiffstats
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2000-03-01 12:20:22 +0000
committersheldonh <sheldonh@FreeBSD.org>2000-03-01 12:20:22 +0000
commit49c4458c80d7fc0c739164002a85966499593dbf (patch)
tree7324d2cb3e29b7c8220abd41fce86411f633eddc /usr.bin/xlint
parent56aefdcd1008df3702556867ce63eb3fc801508b (diff)
downloadFreeBSD-src-49c4458c80d7fc0c739164002a85966499593dbf.zip
FreeBSD-src-49c4458c80d7fc0c739164002a85966499593dbf.tar.gz
Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/xlint/lint.199
1 files changed, 66 insertions, 33 deletions
diff --git a/usr.bin/xlint/xlint/lint.1 b/usr.bin/xlint/xlint/lint.1
index d076b36..2136164 100644
--- a/usr.bin/xlint/xlint/lint.1
+++ b/usr.bin/xlint/xlint/lint.1
@@ -61,7 +61,8 @@
.Nm
attempts to detect features of the named C program files
that are likely to be bugs, to be non-portable, or to be
-wasteful. It also performs stricter type checking then does
+wasteful.
+It also performs stricter type checking then does
the C compiler.
.Nm
runs the C preprocessor as its first phase, with the
@@ -77,7 +78,8 @@ word for all code that is to be checked by
Among the possible problems that are currently noted are
unreachable statements, loops not entered at the top,
variables declared and not used, and logical expressions
-with constant values. Function calls are checked for
+with constant values.
+Function calls are checked for
inconsistencies, such as calls to functions that return
values in some places and not in others, functions called
with varying numbers of arguments, function calls that
@@ -88,7 +90,8 @@ the non-existent return value of the function.
.Pp
Filename arguments ending with
.Pa \&.c
-are taken to be C source files. Filename arguments with
+are taken to be C source files.
+Filename arguments with
names ending with
.Pa \&.ln
are taken to be the result of an earlier invocation of
@@ -98,7 +101,8 @@ with either the
.Fl o
or
.Fl C
-option in effect. The
+option in effect.
+The
.Pa \&.ln
files are analogous to the
.Pa \&.o
@@ -123,7 +127,8 @@ By default,
.Nm
appends the standard C lint library
.Pq Pa llib-lc.ln
-to the end of the list of files. When the
+to the end of the list of files.
+When the
.Fl i
option is used, the
.Pa \&.ln
@@ -134,13 +139,15 @@ or
.Fl i
options are used, the
.Pa llib-l Ns Ar library Ns Pa \&.ln
-files are ignored. When the
+files are ignored.
+When the
.Fl i
option is
.Em omitted
the second pass of
.Nm
-checks this list of files for mutual compatibility. At this point,
+checks this list of files for mutual compatibility.
+At this point,
if a complaint stems not from a given source file, but from one of
its included files, the source filename will be printed followed by
a question mark.
@@ -162,7 +169,8 @@ cause implicit narrowing conversion.
.It Fl b
Report
.Sy break
-statements that cannot be reached. This is not the default
+statements that cannot be reached.
+This is not the default
because, unfortunately, most
.Xr lex 1
and many
@@ -180,11 +188,13 @@ and
.It Fl g
Don't print warnings for some extensions of
.Xr gcc 1
-to the C language. Currently these are nonconstant initializers in
+to the C language.
+Currently these are nonconstant initializers in
automatic aggregate initializations, arithmetic on pointer to void,
zero sized structures, subscripting of non-lvalue arrays, prototypes
overriding old style function declarations and long long
-integer types. The
+integer types.
+The
.Fl g
flag also turns on the keywords
.Sy asm
@@ -203,7 +213,8 @@ Produce a
.Pa \&.ln
file for every
.Pa \&.c
-file on the command line. These
+file on the command line.
+These
.Pa \&.ln
files are the product of
.Nm lint Ns 's
@@ -217,7 +228,8 @@ Attempt to check portability of code to other dialects of C.
In case of redeclarations report the position of the
previous declaration.
.It Fl s
-Strict ANSI C mode. Issue warnings and errors required by ANSI C.
+Strict ANSI C mode.
+Issue warnings and errors required by ANSI C.
Also do not produce warnings for constructs which behave
differently in traditional C and ANSI C. With the
.Fl s
@@ -227,14 +239,17 @@ is a predefined preprocessor macro.
.It Fl t
Traditional C mode.
.Li __STDC__
-is not predefined in this mode. Warnings are printed for constructs
+is not predefined in this mode.
+Warnings are printed for constructs
not allowed in traditional C. Warnings for constructs which behave
-differently in traditional C and ANSI C are suppressed. Preprocessor
+differently in traditional C and ANSI C are suppressed.
+Preprocessor
macros describing the machine type (e.g.
.Li sun3 Ns )
and machine architecture (e.g.
.Li m68k Ns )
-are defined without leading and trailing underscores. The keywords
+are defined without leading and trailing underscores.
+The keywords
.Sy const Ns ,
.Sy volatile
and
@@ -266,7 +281,8 @@ This library is built from all
.Pa \&.c
and
.Pa \&.ln
-input files. After all global definitions of functions and
+input files.
+After all global definitions of functions and
variables in these files are written to the newly created library,
.Nm
checks all input files, including libraries specified with the
@@ -279,7 +295,8 @@ for
.Xr cpp 1 ,
as if by a
.Li #define
-directive. If no definition is given,
+directive.
+If no definition is given,
.Ar name
is defined as 1.
.It Fl I Ns Ar directory
@@ -309,16 +326,19 @@ Name the output file
.Ar outputfile .
The output file produced is the input that is given to
.Nm lint Ns 's
-second pass. The
+second pass.
+The
.Fl o
-option simply saves this file in the named output file. If the
+option simply saves this file in the named output file.
+If the
.Fl i
option is also used the files are not checked for compatibility.
To produce a
.Pa llib-l Ns Ar library Ns Pa \&.ln
without extraneous messages, use of the
.Fl u
-option is suggested. The
+option is suggested.
+The
.Fl v
option is useful if the source file(s) for the lint library
are just external interfaces.
@@ -362,7 +382,8 @@ suppress complaints about fall through to a
.Sy case
or
.Sy default
-labelled statement. This directive should be placed immediately
+labelled statement.
+This directive should be placed immediately
preceding the label.
.It Li /* LINTLIBRARY */
At the beginning of a file, mark all functions and variables defined
@@ -377,7 +398,8 @@ Also shut off complaints about unused function arguments.
.Li */
.Xc
Suppresses any intra-file warning except those dealing with
-unused variables or functions. This directive should be placed
+unused variables or functions.
+This directive should be placed
on the line immediately preceding where the lint warning occurred.
.It Li /* LONGLONG */
Suppress complaints about use of long long integer types.
@@ -391,7 +413,8 @@ makes
.Nm
check the first
.Pq Ar n Ns No -1
-arguments as usual. The
+arguments as usual.
+The
.Ar n Ns No -th
argument is interpreted as a
.Sy printf
@@ -402,10 +425,12 @@ causes
to treat function declaration prototypes as function definitions
if
.Ar n
-is non-zero. This directive can only be used in conjunction with
+is non-zero.
+This directive can only be used in conjunction with
the
.Li /* LINTLIBRARY */
-directive. If
+directive.
+If
.Ar n
is zero, function prototypes will be treated normally.
.It Li /* SCANFLIKE Ns Ar n Li */
@@ -413,14 +438,16 @@ makes
.Nm
check the first
.Pq Ar n Ns No -1
-arguments as usual. The
+arguments as usual.
+The
.Ar n Ns No -th
argument is interpreted as a
.Sy scanf
format string that is used to check the remaining arguments.
.It Li /* VARARGS Ns Ar n Li */
Suppress the usual checking for variable numbers of arguments in
-the following function declaration. The data types of the first
+the following function declaration.
+The data types of the first
.Ar n
arguments are checked; a missing
.Ar n
@@ -433,16 +460,19 @@ and the
.Fl o
options allows for incremental use of
.Nm
-on a set of C source files. Generally, one invokes
+on a set of C source files.
+Generally, one invokes
.Nm
once for each source file with the
.Fl i
-option. Each of these invocations produces a
+option.
+Each of these invocations produces a
.Pa \&.ln
file that corresponds to the
.Pa \&.c
file, and prints all messages that are about just that
-source file. After all the source files have been separately
+source file.
+After all the source files have been separately
run through
.Nm lint ,
it is invoked once more (without the
@@ -451,7 +481,8 @@ option), listing all the
.Pa \&.ln
files with the needed
.Fl l Ns Ar library
-options. this will print all the inter-file inconsistencies. This
+options. this will print all the inter-file inconsistencies.
+This
scheme works well with
.Xr make 1 ;
it allows
@@ -466,7 +497,8 @@ time the set of source files were
.It Ev LIBDIR
the directory where the lint libraries specified by the
.Fl l Ns Ar library
-option must exist. If this environment variable is undefined,
+option must exist.
+If this environment variable is undefined,
then the default path
.Pa /usr/libdata/lint
will be used to search for the libraries.
@@ -505,7 +537,8 @@ option will, when used in later
runs, cause certain errors that were reported when the libraries
were created to be reported again, and cause line numbers and file
names from the original source used to create those libraries
-to be reported in error messages. For these reasons, it is recommended
+to be reported in error messages.
+For these reasons, it is recommended
to use the
.Fl C
option to create lint libraries.
OpenPOWER on IntegriCloud