1. Operation

Splint is invoked by listing files to be checked. Initialization files, command line flags, and stylized comments may be used to customize checking globally and locally.



The best way to learn to use Splint, of course, is to actually use it (if you don’t already have Splint installed on your system, see Appendix A). Before you read much further in this document, I recommend finding a small C program. Then, try running:

splint *.c

For the most C programs, this will produce a large number of warnings. To turn off reporting for some of the warnings, try:

splint -weak *.c

The -weak flag is a mode flag that sets many checking parameters to select weaker checking than is done in the default mode. Other Splint flags will be introduced in the following sections; a complete list is given in Appendix B.


ファイルのリストをSplintに渡すことにより、チェックが行われます。
初期化ファイル、コマンドラインのフラグおよび、様式化されたコメントは、グローバルやローカルでチェックすることをカスタマイズするのに用いられるかもしれません。

もちろん、Splintを使うことを学ぶ最高の方法は、実際にSplintを使うことです。
(もし、あなたのシステム上に、Splintがインストールされていないならば、Appendix Aを見てください)

あなたが本ドキュメントを読み終える前に、小さなCプログラムでSplintを起動することを推奨します。
splint *.c
ほとんどのCプログラムでは、多数の警告を出します。
一部のチェックを無効にするには、下記を試します。
splint -weak *.c

  • weak は、デフォルトモードより弱いチェックで実施するためのモードフラグです。
他のフラグは以降のセクションで説明します。完全なフラグのリストは、Appendix Bにあります。
最終更新:2009年03月27日 19:04