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 |
関数形式マクロが定義されています。
See also Macro Argument is both Mixed and Expanded.
| クラス名 | Function-Like Macro | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 日本語クラス名 | 関数形式マクロの使用 | |||||||||||||||||||||||||||
| クラス分類 | スタイル (style) | |||||||||||||||||||||||||||
| ニーモニック | LANG.PREPROC.FUNCMACRO | |||||||||||||||||||||||||||
| カテゴリー |
|
|||||||||||||||||||||||||||
| 対応言語 | C および C++ で利用可能です。 |
|||||||||||||||||||||||||||
| 有効/無効設定 | このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル
(configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Function-Like Macro" |
#define ONE 1 /* not function-like */ #define TWO (2) /* not function-like */ #define THREE()(3) /* 'Function-Like Macro' warning issued here */ #define FOUR(a)(4) /* 'Function-Like Macro' warning issued here */ #define ADD(a,b)(a+b) /* 'Function-Like Macro' warning issued here */ /* Macros do not need to be used in order to trigger 'Function-Like Macro' warnings. */
設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。