From eb565a1ce208c543392808559ddea709eb1c935b Mon Sep 17 00:00:00 2001 From: Sergey Kazenyuk Date: Mon, 20 Apr 2015 20:02:11 +0300 Subject: [PATCH 1/2] Suppress 'register storage class is deprecated' warning in boost dependency library --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e5dfce7..a3d61daf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,7 +155,7 @@ else() else() set(ARCH_FLAG "-march=${ARCH}") endif() - set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized") + set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized -Wno-deprecated-register") if(NOT MINGW) set(WARNINGS "${WARNINGS} -Werror") endif() @@ -257,4 +257,4 @@ add_subdirectory(src) if(BUILD_TESTS) add_subdirectory(tests) -endif() \ No newline at end of file +endif() From 2ff0d757eb0ce000f222e03cd217e2cc7b47d5f7 Mon Sep 17 00:00:00 2001 From: Sergey Kazenyuk Date: Mon, 20 Apr 2015 20:17:11 +0300 Subject: [PATCH 2/2] Fix missing virtual destructor --- src/p2p/net_node.h | 2 ++ src/p2p/net_node.inl | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 53a13f32..220bda0c 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -89,6 +89,8 @@ namespace nodetool , m_hide_my_port(false) , m_network_id(std::move(network_id)) {} + virtual ~node_server() + {} static void init_options(boost::program_options::options_description& desc); diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index 01fbaa49..b6337e6b 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -82,7 +82,6 @@ namespace nodetool const command_line::arg_descriptor > arg_p2p_seed_node = {"seed-node", "Connect to a node to retrieve peer addresses, and disconnect"}; const command_line::arg_descriptor arg_p2p_hide_my_port = {"hide-my-port", "Do not announce yourself as peerlist candidate", false, true}; } - //----------------------------------------------------------------------------------- template void node_server::init_options(boost::program_options::options_description& desc) @@ -96,7 +95,8 @@ namespace nodetool command_line::add_arg(desc, arg_p2p_add_priority_node); command_line::add_arg(desc, arg_p2p_add_exclusive_node); command_line::add_arg(desc, arg_p2p_seed_node); - command_line::add_arg(desc, arg_p2p_hide_my_port); } + command_line::add_arg(desc, arg_p2p_hide_my_port); + } //----------------------------------------------------------------------------------- template bool node_server::init_config()