mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:49:01 +08:00
6df7d6612b
* [gtest] Add a patch to fix build error in GCC 11 * [gtest] Bump port version to 3 * [gtest] Update version files
23 lines
798 B
Diff
23 lines
798 B
Diff
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;
|