Skip to content

Commit

Permalink
Merge pull request #3024 from Thomas-Barbier-1A:fix_warning_maybe_uni…
Browse files Browse the repository at this point in the history
…ntialized

PiperOrigin-RevId: 334391149
  • Loading branch information
suertreus committed Sep 30, 2020
2 parents f278076 + 4679637 commit a0cbbba
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 a0cbbba

Please sign in to comment.