Refinitiv / Real-Time-SDK

Other
186 stars 129 forks source link

Update bundled gtest from 1.8.1 to 1.11.0 to avoid fatal maybe-uninitialized error with GCC 12 #242

Closed gjvc closed 5 months ago

gjvc commented 1 year ago

version 2.1.1.L1 compiler GCC 12.2

error

In file included from ../../googletest/src/gtest-all.cc:42:
../../googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
../../googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
../../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) {
      |             ^~~~~~~~~~~~~~~~~~~~~
../../googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors

remarks

This was fixed in gtest 1.11.0:

https://github.com/google/googletest/issues/3219 https://github.com/google/googletest/pull/3024

Please bump the gtest version from 1.8.1 to 1.11.0.

vlevendel commented 5 months ago

RTSDK 2.2.0.L1 addresses this issue. Please let us know if you have further concerns. Closing.