Skip to content

Commit 760b773

Browse files
ajkrfacebook-github-bot
authored andcommitted
fix optimization-disabled test builds with platform010 (facebook#11361)
Summary: Fixed the following failure: ``` third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc: In function ‘bool testing::internal::StackGrowsDown()’: third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc:8681:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized] 8681 | StackLowerThanAddress(&dummy, &result); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc:8671:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here 8671 | static void StackLowerThanAddress(const void* ptr, bool* result) { | ^~~~~~~~~~~~~~~~~~~~~ third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc:8679:7: note: ‘dummy’ declared here 8679 | int dummy; | ^~~~~ ``` Pull Request resolved: facebook#11361 Reviewed By: cbi42 Differential Revision: D44838033 Pulled By: ajkr fbshipit-source-id: 27d68b5a24a15723bbaaa7de45ccd70a60fe259e
1 parent d5a9c0c commit 760b773

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8676,7 +8676,7 @@ static void StackLowerThanAddress(const void* ptr, bool* result) {
86768676
// Make sure AddressSanitizer does not tamper with the stack here.
86778677
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
86788678
static bool StackGrowsDown() {
8679-
int dummy;
8679+
int dummy = 0;
86808680
bool result;
86818681
StackLowerThanAddress(&dummy, &result);
86828682
return result;

0 commit comments

Comments
 (0)