HBPVIS / ZeroEQ

Cross-platform C++ library for fast binary and REST messaging
https://hbpvis.github.io/
Other
41 stars 25 forks source link

Update cppnetlib subproject #242

Open jmespadero opened 6 years ago

jmespadero commented 6 years ago

Currently, you have cppnetlib @ cef6472 as a subproject of ZeroEQ.

That version of cppnetlib contains this libs/network/src/uri/schemes.cpp file: https://github.com/cpp-netlib/cpp-netlib/blob/cef6472065a3d964b765681f5988e28866c26d74/libs/network/src/uri/schemes.cpp

But that file has two "defined but not used" warnings at lines 47 and 48, that prevent ZeroEQ to be compiled with the option -Werror=unused-variable, or any project that uses ZeroEQ as dependency.

I know that you are not responsible for this warnings, but could you please consider to upgrade the version of cppnetlib you are using?

hernando commented 6 years ago

Which compiler is printing those warnings. I cannot see any warning with gcc 5.4

jmespadero commented 6 years ago

My compiler is g++ 5.4, the default bundled with Ubuntu Xenial LTS.

I use this sequence of commands to detect uninitialized or unused variables:

rm -rf build ; mkdir build && cd build 
cmake .. -DCLONE_SUBPROJECTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -Werror=shadow -Werror=unused -Werror=uninitialized" 
make -j 6 VERBOSE=1 

The output I got is this:

[ 51%] Building CXX object cppnetlib/libs/network/src/CMakeFiles/cppnetlib-uri.dir/uri/schemes.cpp.o
cd /home/xxx/Desktop/ZeroEQ/buildCheck/cppnetlib/libs/network/src && /usr/bin/c++   -DBOOST_ALL_NO_LIB -DBOOST_NETWORK_ENABLE_HTTPS -DBOOST_SPIRIT_THREADSAFE -DBOOST_TEST_DYN_LINK -DBoost_NO_BOOST_CMAKE -DUSE_PYTHON3=1 -DWARN_DEPRECATED -Dcppnetlib_uri_EXPORTS -I/home/xxx/Desktop/ZeroEQ/cppnetlib  -Wall -Werror=shadow -Werror=unused -Werror=uninitialized -Wall -std=c++11 -O3 -DNDEBUG -fPIC   -o CMakeFiles/cppnetlib-uri.dir/uri/schemes.cpp.o -c /home/xxx/Desktop/ZeroEQ/cppnetlib/libs/network/src/uri/schemes.cpp
/home/xxx/Desktop/ZeroEQ/cppnetlib/libs/network/src/uri/schemes.cpp:47:13: error: ‘boost::network::uri::{anonymous}::hierarchical’ defined but not used [-Werror=unused-variable]
 static bool hierarchical = register_hierarchical_schemes();
             ^
/home/xxx/Desktop/ZeroEQ/cppnetlib/libs/network/src/uri/schemes.cpp:48:13: error: ‘boost::network::uri::{anonymous}::opaque’ defined but not used [-Werror=unused-variable]
 static bool opaque = register_opaque_schemes();
             ^
cc1plus: some warnings being treated as errors

The error here is not important, but it prevents the usage of my script to search unused variables in projects that use ZeroEQ as dependency. The current version of cppnetlib does not contains that unused variables.