Googletest export
cleanup: fix spurious MSAN warnings with Clang 12
PiperOrigin-RevId: 378430614
diff --git a/googletest/src/gtest-filepath.cc b/googletest/src/gtest-filepath.cc
index 9504f0f..0b56294 100644
--- a/googletest/src/gtest-filepath.cc
+++ b/googletest/src/gtest-filepath.cc
@@ -210,7 +210,7 @@
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 @@
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