瀏覽代碼

Remove old false positive avoidance code

From email explaining existence in the first place:

    This is from before when the used checks throwing false
    positives about unused due to changing the definition without
    checking whether it *had* a value to begin with and me not
    realizing they were false positives. I was thinking that it was
    warning from ARGC et. al. not being used since the previous
    macro or function call and the new value warning about
    overwriting the old value.
Ben Boeckel 15 年之前
父節點
當前提交
f231ce5ce3
共有 1 個文件被更改,包括 0 次插入4 次删除
  1. 0 4
      Source/cmFunctionCommand.cxx

+ 0 - 4
Source/cmFunctionCommand.cxx

@@ -112,7 +112,6 @@ bool cmFunctionHelperCommand::InvokeInitialPass
   // set the value of argc
   // set the value of argc
   cmOStringStream strStream;
   cmOStringStream strStream;
   strStream << expandedArgs.size();
   strStream << expandedArgs.size();
-  this->Makefile->MarkVariableAsUsed("ARGC");
   this->Makefile->AddDefinition("ARGC",strStream.str().c_str());
   this->Makefile->AddDefinition("ARGC",strStream.str().c_str());
   this->Makefile->MarkVariableAsUsed("ARGC");
   this->Makefile->MarkVariableAsUsed("ARGC");
 
 
@@ -121,7 +120,6 @@ bool cmFunctionHelperCommand::InvokeInitialPass
     {
     {
     cmOStringStream tmpStream;
     cmOStringStream tmpStream;
     tmpStream << "ARGV" << t;
     tmpStream << "ARGV" << t;
-    this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str());
     this->Makefile->AddDefinition(tmpStream.str().c_str(), 
     this->Makefile->AddDefinition(tmpStream.str().c_str(), 
                                   expandedArgs[t].c_str());
                                   expandedArgs[t].c_str());
     this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str());
     this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str());
@@ -156,10 +154,8 @@ bool cmFunctionHelperCommand::InvokeInitialPass
       }
       }
     cnt ++;
     cnt ++;
     }
     }
-  this->Makefile->MarkVariableAsUsed("ARGV");
   this->Makefile->AddDefinition("ARGV", argvDef.c_str());
   this->Makefile->AddDefinition("ARGV", argvDef.c_str());
   this->Makefile->MarkVariableAsUsed("ARGV");
   this->Makefile->MarkVariableAsUsed("ARGV");
-  this->Makefile->MarkVariableAsUsed("ARGN");
   this->Makefile->AddDefinition("ARGN", argnDef.c_str());
   this->Makefile->AddDefinition("ARGN", argnDef.c_str());
   this->Makefile->MarkVariableAsUsed("ARGN");
   this->Makefile->MarkVariableAsUsed("ARGN");