Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283062

Uninitialized warnings in libgtest with GCC 11.2

XMLWordPrintable

    • b14
    • linux

        In file included from googletest-release-1.8.1/googletest/src/gtest-all.cc:42:
        googletest-release-1.8.1/googletest/src/gtest-death-test.cc: In function 'bool testing::internal::StackGrowsDown()':
        googletest-release-1.8.1/googletest/src/gtest-death-test.cc:1224:24: error: 'dummy' may be used uninitialized [-Werror=maybe-uninitialized]
         1224 | StackLowerThanAddress(&dummy, &result);
              | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
        googletest-release-1.8.1/googletest/src/gtest-death-test.cc:1214:13: note: by argument 1 of type 'const void*' to 'void testing::internal::StackLowerThanAddress(const void*, bool*)' declared here
         1214 | static void StackLowerThanAddress(const void* ptr, bool* result) {
              | ^~~~~~~~~~~~~~~~~~~~~
        googletest-release-1.8.1/googletest/src/gtest-death-test.cc:1222:7: note: 'dummy' declared here
         1222 | int dummy;

              mikael Mikael Vidstedt
              mikael Mikael Vidstedt
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: