Skip to content

Commit

Permalink
Fix warning maybe-uninitialized
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Barbier-1A committed Sep 24, 2020
1 parent 7aca844 commit 4679637
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions googletest/src/gtest-death-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1281,15 +1281,15 @@ 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);
}

// Make sure AddressSanitizer does not tamper with the stack here.
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;
Expand Down

0 comments on commit 4679637

Please sign in to comment.