[adlint-user-ja:96] W9001エラーになる問題
Open source and free source code static analyzer
Brought to you by:
asamiogis
From: 松村悟 <ma...@no...> - 2015-01-28 03:06:11
|
お世話になります。 株式会社ノーリツの松村です。 if、switch文などの式で、変数の値が、その箇所では変更されないもので、他のファイルで、書き換えるような場合、W9001エラーが出ます (シングルモジュール解析のメトリクス測定結果には、エラーの箇所からの関数コールは無いと判断されています)。 その結果、クロスモジュール解析 で、関数コール数が実際と合わなくなります。 出来るなら改善をお願いします。 例) 下記のfile1.cとfile2.cのような場合、func_int()が、割込みで定期的に実行されているようなソフトの場合、main()のfunc_sub();の行が、W9001エラーになります。 # # file1.c void main(void){ flg = 0; for(;;){ if(flg == 1) func_sub(); ← ここが、実行されないと判断されて、W9001エラーになり、関数コールされていないことになる。 } } # # file1.c end # # file2.c void func_int(void){ if(flg){ flg = 0; }else{ flg = 1; } } # # file2.c end 以上、宜しくお願い致します。 |