]> git-server-git.apps.pok.os.sepia.ceph.com Git - googletest.git/commitdiff
Googletest export
authorAbseil Team <absl-team@google.com>
Wed, 9 Jun 2021 16:55:55 +0000 (09:55 -0700)
committerDino Radaković <dinor@google.com>
Fri, 11 Jun 2021 17:41:50 +0000 (10:41 -0700)
cleanup: fix spurious MSAN warnings with Clang 12
PiperOrigin-RevId: 378430614

googletest/src/gtest-filepath.cc

index 9504f0f5b25def2ef93a6d616a55633cbbcf461d..0b5629401b5a87c894fa1e2b95554c08874ace87 100644 (file)
@@ -210,7 +210,7 @@ bool FilePath::FileOrDirectoryExists() const {
   delete [] unicode;
   return attributes != kInvalidFileAttributes;
 #else
-  posix::StatStruct file_stat;
+  posix::StatStruct file_stat{};
   return posix::Stat(pathname_.c_str(), &file_stat) == 0;
 #endif  // GTEST_OS_WINDOWS_MOBILE
 }
@@ -237,7 +237,7 @@ bool FilePath::DirectoryExists() const {
     result = true;
   }
 #else
-  posix::StatStruct file_stat;
+  posix::StatStruct file_stat{};
   result = posix::Stat(path.c_str(), &file_stat) == 0 &&
       posix::IsDir(file_stat);
 #endif  // GTEST_OS_WINDOWS_MOBILE