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.0p0 Hot Tips | CONFIDENTIAL | CodeSecure Inc |
ローカルスコープでのみ使用されている変数が、より大きなスコープで定義されています。
設定ファイルパラメータ SCOPE_CHECK_SUGGESTS_LOCAL_STATIC が No に設定されている場合、ローカルスコープの可能性のワーニングは検出されません。 その代わり、ローカルスコープの可能性がある変数のうち、グローバルスコープとして定義されたものは(ファイルスコープの可能性) としてレポートされ、ファイルスコープとして定義されたものはレポートされません。
| クラス名 | Scope Could Be Local Static | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 日本語クラス名 | ローカルスコープの可能性 | ||||||||||||||||||||||||||||||||||||||||||||||||
| クラス分類 | スタイル (style) | ||||||||||||||||||||||||||||||||||||||||||||||||
| ニーモニック | LANG.STRUCT.SCOPE.LOCAL | ||||||||||||||||||||||||||||||||||||||||||||||||
| カテゴリー |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| 対応言語 | C および C++ で利用可能です。 |
||||||||||||||||||||||||||||||||||||||||||||||||
| 有効/無効設定 | このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル
(configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Scope Could Be Local Static" |
int myint = 5; /* 'Scope Could Be Local Static' warning issued here */ /* ... */ /* code that does not use myint */ int modify_int(int i){ return i + myint; } /* ... */ /* code that does not use myint */
設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。