Compile error -Werror=unused-variable


I am trying to compile 15.12. I am using the same process I successfully used for 15.7: setup --force make -j4

During the make I get:

/usr/src/scidb- In function 'double scidb::perfTimeGetElapsed()':
/usr/src/scidb- error: unused variable 'result' [-Werror=unused-variable]
         auto result = ::gettimeofday(&tv, NULL);
/usr/src/scidb- In function 'double scidb::perfTimeGetCPU()':
/usr/src/scidb- error: unused variable 'result' [-Werror=unused-variable]
         auto result = ::getrusage(RUSAGE_THREAD, &rUsage);

It looks like something that could easily be ignored, but I’m not sure where is the bast place to do it.


I was able to successfully compile 15.12 by changing:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion -Werror")

line to:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion")

in the CMakeLists.txt file.