2 .\" # Copyright (c) 2014, Juniper Networks, Inc.
3 .\" # All rights reserved.
4 .\" # This SOFTWARE is licensed under the LICENSE provided in the
5 .\" # ../Copyright file. By downloading, installing, copying, or
6 .\" # using the SOFTWARE, you agree to be bound by the terms of that
8 .\" # Phil Shafer, July 2014
15 .Nd detect errors in programs using
30 is a tool for reporting common mistakes in format strings
31 in source code that invokes
33 It allows these errors
34 to be diagnosed at build time, rather than waiting until runtime.
37 takes one or more C files as arguments, and reports
38 error, warning, or informational messages as needed.
39 .Bl -tag -width "C <flags>"
41 Invoke 'cpp' against the input file
43 Flags that are passed to 'cpp'
47 Generate documentation for all
55 Print the offending lines after the error message is displayed
57 Do not report errors, but instead print a complete list of
58 all field names, sorted alphabetically.
59 The output can help spot
60 inconsistencies and spelling errors.
64 suitable for internal testing.
67 The output message contains the source filename and line number, the
68 class of the message, the message, and, if
71 line that contains the error:
72 .Bd -literal -offset indent
74 xolint.c: 16: error: anchor format should be "%d"
75 16 xo_emit("{[:/%s}");
83 library first appeared in
88 .An Phil Shafer Aq Mt phil@freebsd.org .