JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
何も影響を与えない関数呼び出しです。
このクラスのワーニングは、サイズ引数が0となるメモリコピー関数呼び出しをチェックします。
| クラス名 | Function Call Has No Effect | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 日本語クラス名 | 無意味な関数呼出し | |||||||||||||||||||||||||||||||||||||||||||||
| クラス分類 | セキュリティ (security) | |||||||||||||||||||||||||||||||||||||||||||||
| ニーモニック | MISC.NOEFFECT | |||||||||||||||||||||||||||||||||||||||||||||
| カテゴリー |
|
|||||||||||||||||||||||||||||||||||||||||||||
| 対応言語 | C および C++ で利用可能です。 |
|||||||||||||||||||||||||||||||||||||||||||||
| 有効/無効設定 | このワーニングクラスのチェックはデフォルトで有効になっています。チェックを無効にするにはプロジェクト設定ファイル
(configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += discard class="Function Call Has No Effect" |
| CWE:683 | Function Call With Incorrect Order of Arguments |
|---|
以下は、 memset() 呼び出しで全ての buf 領域に '\0' を設定しようとした意図に反し、引数の順序を間違えた例です。
#include <string.h>
void f(void)
{
char buf[10];
memset(buf, 10, '\0'); /* Function Call Has No Effect
* warning issued here */
}
CodeSonar ships with library models that allow it to functions such as libc memcpy() and Win32 StrCatBuffA()/StrCatBuffW() that copy a specified amount of memory. If one of these functions is called with a constant-valued expression that evaluates to zero in the length parameter position, a warning will be issued.
If you have created a custom library model for some function f() in terms of one of these existing models, calls to f() will also be capable of triggering Function Call Has No Effect warnings.
設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。
To report problems with this documentation, please visit https://support.codesecure.com/.