Merge pull request #3024 from Thomas-Barbier-1A:fix_warning_maybe_unintialized

PiperOrigin-RevId: 334391149
This commit is contained in:
Andy Getz 2020-09-29 20:47:54 -04:00
commit a0cbbba131

View File

@ -1281,7 +1281,7 @@ static void StackLowerThanAddress(const void* ptr,
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
static void StackLowerThanAddress(const void* ptr, bool* result) {
int dummy;
int dummy = 0;
*result = (&dummy < ptr);
}
@ -1289,7 +1289,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;