Safety Check Usage
During the course of development, there may be times when a non-threadsafe type of code
must be used. You can mark source code with an explanation about why the non-threadsafe
code exists. Safety Check will then display this information as part of its run. To mark
source code with an exception, include a comment in this format: /*_LRBF
<comment text */.
The comment must begin with
"/*_LRBF.
" The remainder of the comment can span multiple lines and
include any other necessary text. The entire comment will print as part of Safety Check
output.
You control Safety Check functionality through several options, at least one of which must be supplied. Multiple options are supported. Quotation marks are required only when the path specified contains spaces. For example, if the single C source file b1234.c is stored in the "c:\source" directory, you could call SafetyCheck in one of two ways: SafetyCheck --F c:\source\b1234.c or SafetyCheck --F "c:\source\b1234.c" However, if the same C source file is stored in the "c:\test files", you must enclose the path/filename in quotations: SafetyCheck --F "c:\test files\b1234.c"
Argument |
Usage |
---|---|
--F<C source file> |
Use to check a single C source file, for example, --F c:\test\b1234.c |
--I<Header file> |
Use to check a single header file, for example, --I c:\include\b1234.h |
--FD<C source directory> |
Use to check all C source files in a given directory, for example, --FD c:\my project\source. Note: Do not include a trailing slash as part of the directory argument. |
--ID<Header file directory> |
Use to check all header files in a given directory, for example --ID c:\my project\include Note: Do not include a trailing slash as part of the directory argument. |
--P<Project file> |
Use to create a text file that contains a list of files, each of which will be scanned by Safety Check. The project file should contain multiple lines of the form: SOURCE=<fully qualified file name> Note: Do not use quotation marks in the project file. For example, a project file that specifies three files to scan could look like this:
|
--csv |
Use to produce output in a comma-delimited format. The output will contain these elements:
|
--X |
Select to print a warning message when a file to check is specified that does not end in "c" or "h". By default, these warning messages are hidden. |