COVESA / COVESA/iot-event-analytics

c++ build error

Open
#102 1 comment 0 reactions 1 assignee Assigned to @tspreck View on GitHub
bug
Dominant language
JavaScript
Stars
26
Forks
14
PR merge metrics
No merged PRs in 30d

Description

I got the following error for c++ build:
```
[ 51%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
In file included from /home/wenwen/data/f/iot-event-analytics2/src/sdk/cpp/build/_deps/googletest-src/googletest/src/gtest-all.cc:42:
/home/wenwen/data/f/iot-event-analytics2/src/sdk/cpp/build/_deps/googletest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/home/wenwen/data/f/iot-event-analytics2/src/sdk/cpp/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
1301 | StackLowerThanAddress(&dummy, &result);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/wenwen/data/f/iot-event-analytics2/src/sdk/cpp/build/_deps/googletest-src/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/wenwen/data/f/iot-event-analytics2/src/sdk/cpp/build/_deps/googletest-src/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
1299 | int dummy;
| ^~~~~
cc1plus: all warnings being treated as errors
```
```
-- CMake version: 3.20.3
-- CMake system name: Linux
-- g++ (GCC) 11.1.
```
Even if I turn off test build with `cmake .. -DBUILD_TESTING=OFF`, target `gtest` is still to be built. I can not understand why.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.