C and C++


LANG.FUNCS.TMFP : 多すぎる仮引数

要旨

関数の引数の数が MAX_NUM_PARAMS で設定されたしきい値(デフォルトは 6)を超えています。

プロパティ

クラス名 Too Many Parameters
日本語クラス名 多すぎる仮引数
クラス分類 スタイル (style)
ニーモニック LANG.FUNCS.TMFP
カテゴリー
CWE CWE:710 Improper Adherence to Coding Standards
  CWE:1064 Invokable Control Element with Signature Containing an Excessive Number of Parameters
JSF++ JSF++:110 Functions with more than 7 arguments will not be used.
JPL JPL:25 Use short functions with a limited number of parameters.
対応言語 C および C++ で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Too Many Parameters"

int way_too_many(int x, int y, int z, 
                 int dx, int dy, int dz,
                 char *caption)         /* 'Too Many Parameters' warning issued here */
{
  /* function body ... */
  return 1;
}

関連のある設定ファイルパラメータ

設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。