summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2021-06-09 09:55:55 -0700
committerDino Radaković <dinor@google.com>2021-06-11 10:41:50 -0700
commitc5be3930f59f3ae99725ed99031aae4d8b8bbb3b (patch)
treedf0344f100d75f6a1914280a09df51e06279df04
parentaa533abfd4232b01f9e57041d70114d5a77e6de0 (diff)
downloadgoogletest-git-c5be3930f59f3ae99725ed99031aae4d8b8bbb3b.tar.gz
Googletest export
cleanup: fix spurious MSAN warnings with Clang 12 PiperOrigin-RevId: 378430614
-rw-r--r--googletest/src/gtest-filepath.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/src/gtest-filepath.cc b/googletest/src/gtest-filepath.cc
index 9504f0f5..0b562940 100644
--- a/googletest/src/gtest-filepath.cc
+++ b/googletest/src/gtest-filepath.cc
@@ -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