Skip to content

Commit

Permalink
initialize variables
Browse files Browse the repository at this point in the history
  • Loading branch information
nosracd committed Oct 28, 2024
1 parent 8790469 commit 52fd6ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/gtest/src/gtest-death-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -997,14 +997,14 @@ static int ExecDeathTestChildMain(void* child_arg) {
// correct answer.
void StackLowerThanAddress(const void* ptr, bool* result) GTEST_NO_INLINE_;
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_
bool StackGrowsDown() {
int dummy;
int dummy = 0;
bool result;
StackLowerThanAddress(&dummy, &result);
return result;
Expand Down

0 comments on commit 52fd6ea

Please sign in to comment.