diff --git a/Registry.cxx b/Registry.cxx
index 7c298f7fb2f4a6044e720b65f6f20f22cfb9e80a..6e75c66e05e59b7224964685859189a72aa646f0 100644
--- a/Registry.cxx
+++ b/Registry.cxx
@@ -267,7 +267,6 @@ bool Registry::DeleteValue(const char *subkey, const char *key)
     if ( !this->Open(this->GetTopLevel(), subkey, 
         Registry::READWRITE) )
       {
-      std::cerr << "Failed to open\n";
       return res;
       }
     open = true;
diff --git a/SystemTools.cxx b/SystemTools.cxx
index da90a4d5d9f9429b01c085956629a35a51fbc5c8..f689508ba7d76cc05e19cc44370ede2093dacd9e 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -1923,7 +1923,7 @@ kwsys_stl::string SystemTools::FindProgram(
     {
     return "";
     }
-  std::string ext = SystemTools::GetExecutableExtension();
+  kwsys_stl::string ext = SystemTools::GetExecutableExtension();
   if(ext.size())
     {
     unsigned int len = strlen(name);