Initialize dummy variable

Building fails with a warning that we didn't init this var.  So I'm
setting it to 0.  Is that right, wrong, catastrophic?  I dunno, but
the warning went away and the build succeeds.  Maybe it would be
better to just -Wno-error=maybe-uninitialized in
vendor/github.com/google/googletest/googletest/cmake/internal_utils.cmake
or something.
This commit is contained in:
James Vasile 2022-03-18 21:45:13 -04:00
parent c444f9b917
commit d0ee11fe68

View File

@ -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;