浏览代码

COMP: Fix shadowed local variable warning.

Brad King 17 年之前
父节点
当前提交
a0715048da
共有 3 个文件被更改,包括 6 次插入0 次删除
  1. 2 0
      Source/cmAddCustomTargetCommand.cxx
  2. 2 0
      Source/cmAddExecutableCommand.cxx
  3. 2 0
      Source/cmAddLibraryCommand.cxx

+ 2 - 0
Source/cmAddCustomTargetCommand.cxx

@@ -159,12 +159,14 @@ bool cmAddCustomTargetCommand
     }
 
   // Enforce name uniqueness.
+  {
   std::string msg;
   if(!this->Makefile->EnforceUniqueName(args[0], msg))
     {
     this->SetError(msg.c_str());
     return false;
     }
+  }
 
   // Add the utility target to the makefile.
   bool escapeOldStyle = !verbatim;

+ 2 - 0
Source/cmAddExecutableCommand.cxx

@@ -101,12 +101,14 @@ bool cmAddExecutableCommand
     }
 
   // Enforce name uniqueness.
+  {
   std::string msg;
   if(!this->Makefile->EnforceUniqueName(exename, msg))
     {
     this->SetError(msg.c_str());
     return false;
     }
+  }
 
   if (s == args.end())
     {

+ 2 - 0
Source/cmAddLibraryCommand.cxx

@@ -128,12 +128,14 @@ bool cmAddLibraryCommand
     }
 
   // Enforce name uniqueness.
+  {
   std::string msg;
   if(!this->Makefile->EnforceUniqueName(libName, msg))
     {
     this->SetError(msg.c_str());
     return false;
     }
+  }
 
   if (s == args.end())
     {