diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index da09a1cf..43cbd78a 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -1288,7 +1288,7 @@ static void StackLowerThanAddress(const void* ptr, // making comparison result unpredictable. GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ static void StackLowerThanAddress(const void* ptr, bool* result) { - int dummy; + int dummy = 0; *result = (&dummy < ptr); } @@ -1296,7 +1296,7 @@ static void StackLowerThanAddress(const void* ptr, bool* result) { GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ static bool StackGrowsDown() { - int dummy; + int dummy = 0; bool result; StackLowerThanAddress(&dummy, &result); return result;