Răsfoiți Sursa

COMP: Remove shadow variable warning

Andy Cedilnik 20 ani în urmă
părinte
comite
2804a0d7db
2 a modificat fișierele cu 11 adăugiri și 10 ștergeri
  1. 7 6
      Source/cmFindFileCommand.cxx
  2. 4 4
      Source/cmGlobalXCodeGenerator.cxx

+ 7 - 6
Source/cmFindFileCommand.cxx

@@ -113,9 +113,10 @@ cmStdString cmFindFileCommand::FindHeaderInFrameworks(
   const char* defineVar,
   const char* file)
 {
+  (void)defineVar;
+
 #ifndef __APPLE__
   (void)path;
-  (void)defineVar;
   (void)file;
   return cmStdString("");
 #else
@@ -150,11 +151,11 @@ cmStdString cmFindFileCommand::FindHeaderInFrameworks(
       fpath += "/";
       fpath += frameWorkName;
       fpath += ".framework";
-      std::string path = fpath;
-      path += "/Headers/";
-      path += fileName;
-      std::cerr << "try " << path << "\n";
-      if(cmSystemTools::FileExists(path.c_str()))
+      std::string intPath = fpath;
+      intPath += "/Headers/";
+      intPath += fileName;
+      std::cerr << "try " << intPath << "\n";
+      if(cmSystemTools::FileExists(intPath.c_str()))
         {
         return fpath;
         }

+ 4 - 4
Source/cmGlobalXCodeGenerator.cxx

@@ -1198,12 +1198,12 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
   std::vector<std::string>& frameworks = target.GetFrameworks();
   if(frameworks.size())
     {
-    for(std::vector<std::string>::iterator i = frameworks.begin();
-        i != frameworks.end(); ++i)
+    for(std::vector<std::string>::iterator fmIt = frameworks.begin();
+        fmIt != frameworks.end(); ++fmIt)
       {
-      if(emitted.insert(*i).second)
+      if(emitted.insert(*fmIt).second)
         {
-        fdirs += this->XCodeEscapePath(i->c_str());
+        fdirs += this->XCodeEscapePath(fmIt->c_str());
         fdirs += " ";
         }
       }