Skip to content

Errors When Compiling on Ubuntu 22.04 #187

Open
@ghost

Description

I am getting these errors while compiling, on Ubuntu 22.04:

In file included from /home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-all.cc:42:
/home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/krixano/LucenePlusPlus/src/test/gtest/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) {
      |             ^~~~~~~~~~~~~~~~~~~~~
/home/krixano/LucenePlusPlus/src/test/gtest/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/test/gtest/googletest/CMakeFiles/gtest.dir/build.make:76: src/test/gtest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:882: src/test/gtest/googletest/CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Gcc Version: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions