JP1/NETM/DM Automatic Installation Toolガイド (Windows(R)用)

[目次][用語][索引][前へ][次へ]

AITCW-0036

<変数名> : 定義された変数が使われていません。

要因
変数がDEFINEセクションで定義されていますが,参照されていません。
対処
不要な場合や使用しない場合は,変数の定義を削除してください。
誤った指定例
DEFINE
{
   const string ExeVersion = "7.1";
   const string FileVersion = "7.1";
   integer sloop_max;      // この変数はプログラム内のどこからも参照されていません
   string stMsgText;
}
MAIN
{
   if (ExeVersion == FileVersion)
      AIT_LogMessage("Setup(Japanese)For Windows-Start");
      if (AIT_FileExists("#setup.exe") == 0)
         stMsgText = "Setup(Japanese) " + InstallerName + " Not Found";
      endif;
   endif;
}
上の例で,変数「sloop_max」はDEFINEセクションで定義されていますが,MAINセクション内で使用されていません。
正しい指定例
DEFINE
{
   const string ExeVersion = "7.1";
   const string FileVersion = "7.1";
   integer sloop_max;
   string stMsgText;
}
MAIN
{
   if (ExeVersion == FileVersion)
      AIT_LogMessage("Setup(Japanese)For Windows-Start");
      if (AIT_FileExists("#setup.exe") == 0)
         sloop_max = 0;// ここで変数「sloop_max」が使用されています
         stMsgText = "Setup(Japanese) " + InstallerName + " Not Found";
         AIT_LogMessage(stMsgText);
      endif;
   endif;
}
変数「sloop_max」はMAINセクション内で使用しました。
なお,MAINセクションで必要のない変数はDEFINEセクションから削除する対処方法もあります。