Splint FAQによると:
Win32 の場合、DOS ファイル名の制限により、Splint は .splintrc の代わりに splint.rc を探します。最初に現在のディレクトリが検索され、次にホーム ディレクトリが検索されます。
Splint を動作させるための非常に簡単なテストをセットアップしました。
- ステップ1:抽出
splint-3.1.1.win32.zip
するc:\splint
ステップ 2:
c:\test\test.c
簡単なプログラムを入力します。ボイドメイン(ボイド){}
ステップ 3: 「cmd」を実行する
- ステップ 4: コマンドを入力します。
cd c:\test\
次に、splint.rc なしで、フラグなしで、splint を使用しようとします。
- ステップ 5: コマンド「c:\splint\bin\splint.exe test.c」を入力します
予想どおり、これにより出力が生成されますThe function main does not output the expected type
次に、splint.rc と -maintype フラグなしで、splint を使用しようとします。
- ステップ 5: コマンド「c:\splint\bin\splint.exe test.c -maintype」を入力します
予想どおり、出力は生成されなくなりましThe function main does not output the expected type
た。
次に、-maintype フラグが含まれる splint.rc を使用して、splint を使用しようとします。
- ステップ5:
c:\test\splint.rc
中身を入れます-maintype
。 - ステップ 5: コマンド「c:\splint\bin\splint.exe test.c」を入力します
に入力-maintype
しsplint.rc
、そこに含まれるディレクトリから splint コマンドを実行しているためsplint.rc
、splint は main 関数に関する警告を表示するべきではありませんが、表示されます。私は、スプリントが splint.rc 構成ファイルを取得していないと推測しています。
私は何を間違っていますか?ありがとう