diff --git a/CommandLineArguments.cxx b/CommandLineArguments.cxx
index a97f7a8365d9464286ec4ac35fed94378e4edc3a..dc9f01d97b158b792ab02ae9cc64843a19e834cf 100644
--- a/CommandLineArguments.cxx
+++ b/CommandLineArguments.cxx
@@ -67,10 +67,10 @@ class CommandLineArgumentsInternal
 {
 public:
   CommandLineArgumentsInternal()
+    : UnknownArgumentCallback{ KWSYS_NULLPTR }
+    , ClientData{ KWSYS_NULLPTR }
+    , LastArgument{ 0 }
   {
-    this->UnknownArgumentCallback = KWSYS_NULLPTR;
-    this->ClientData = KWSYS_NULLPTR;
-    this->LastArgument = 0;
   }
 
   typedef CommandLineArgumentsVectorOfStrings VectorOfStrings;
diff --git a/RegularExpression.cxx b/RegularExpression.cxx
index 5f84b1946336d4eb39485741701c1e170e2882a6..3e10765bd0479583068409c067658adbf82a2b96 100644
--- a/RegularExpression.cxx
+++ b/RegularExpression.cxx
@@ -337,7 +337,6 @@ bool RegularExpression::compile(const char* exp)
 {
   const char* scan;
   const char* longest;
-  size_t len;
   int flags;
 
   if (exp == KWSYS_NULLPTR) {
@@ -412,7 +411,7 @@ bool RegularExpression::compile(const char* exp)
     //
     if (flags & SPSTART) {
       longest = KWSYS_NULLPTR;
-      len = 0;
+      size_t len = 0;
       for (; scan != KWSYS_NULLPTR; scan = regnext(scan))
         if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
           longest = OPERAND(scan);
diff --git a/RegularExpression.hxx.in b/RegularExpression.hxx.in
index b7b93f962ddb82312b4a0d296ccf4ffc2c634c45..ed86418703104993cee826a1f0ba1f0b53856114 100644
--- a/RegularExpression.hxx.in
+++ b/RegularExpression.hxx.in
@@ -407,8 +407,12 @@ private:
  * Create an empty regular expression.
  */
 inline RegularExpression::RegularExpression()
+  : regstart{}
+  , reganch{}
+  , regmust{}
+  , program{ 0 }
+  , progsize{}
 {
-  this->program = 0;
 }
 
 /**
@@ -416,8 +420,12 @@ inline RegularExpression::RegularExpression()
  * compiles s.
  */
 inline RegularExpression::RegularExpression(const char* s)
+  : regstart{}
+  , reganch{}
+  , regmust{}
+  , program{ 0 }
+  , progsize{}
 {
-  this->program = 0;
   if (s) {
     this->compile(s);
   }
@@ -428,8 +436,12 @@ inline RegularExpression::RegularExpression(const char* s)
  * compiles s.
  */
 inline RegularExpression::RegularExpression(const std::string& s)
+  : regstart{}
+  , reganch{}
+  , regmust{}
+  , program{ 0 }
+  , progsize{}
 {
-  this->program = 0;
   this->compile(s);
 }
 
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 2135913f5abc7cf15a4b1a046aa77a57ed77791c..feeb65fc324b6cd3f831694727892d03e8226c8e 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -3411,9 +3411,9 @@ std::string SystemTools::CollapseFullPath(const std::string& in_path,
                                           const char* in_base)
 {
   // Use the current working directory as a base path.
-  char buf[2048];
   const char* res_in_base = in_base;
   if (!res_in_base) {
+    char buf[2048];
     if (const char* cwd = Getcwd(buf, 2048)) {
       res_in_base = cwd;
     } else {
@@ -4738,7 +4738,7 @@ void SystemTools::ClassInitialize()
       // Test progressively shorter logical-to-physical mappings.
       std::string cwd_str = cwd;
       std::string pwd_path;
-      Realpath(pwd_str.c_str(), pwd_path);
+      Realpath(pwd_str, pwd_path);
       while (cwd_str == pwd_path && cwd_str != pwd_str) {
         // The current pair of paths is a working logical mapping.
         cwd_changed = cwd_str;
@@ -4748,7 +4748,7 @@ void SystemTools::ClassInitialize()
         // mapping still works.
         pwd_str = SystemTools::GetFilenamePath(pwd_str);
         cwd_str = SystemTools::GetFilenamePath(cwd_str);
-        Realpath(pwd_str.c_str(), pwd_path);
+        Realpath(pwd_str, pwd_path);
       }
 
       // Add the translation to keep the logical path name.