Skip to content

Commit

Permalink
googletest: pick up change to silence error=maybe-uninitialized warning
Browse files Browse the repository at this point in the history
to include the fix of google/googletest#3024.
because this fix is not included in the latest release (1.10.0) of
googletest yet at the time of writing. the submodule is referencing the
latest master HEAD of google/googletest.

otherwise GCC-11 fails to compile the tests with following warning:

In file included from ../src/googletest/googletest/src/gtest-all.cc:42:
../src/googletest/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
../src/googletest/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
../src/googletest/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) {
      |             ^~~~~~~~~~~~~~~~~~~~~
../src/googletest/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Jan 6, 2021
1 parent 6398ca5 commit 89c8f41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/googletest
Submodule googletest updated 113 files

0 comments on commit 89c8f41

Please sign in to comment.