diff --git a/build/pion-boost.inc b/build/pion-boost.inc index ed82bbbd0..407acc9e5 100644 --- a/build/pion-boost.inc +++ b/build/pion-boost.inc @@ -134,25 +134,22 @@ if test "x$enable_tests" == "xno"; then # Display notice if unit tests are disabled AC_MSG_NOTICE([Unit tests are disabled]) else - BOOST_TRY_LIB=unit_test_framework - BOOST_TRY_LINK="$BOOST_HOME_DIR/lib/libboost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}.a" # check if static version of lib is available - if !(test -r "$BOOST_TRY_LINK"); then - BOOST_TRY_LINK="-lboost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" - PION_TESTS_CPPFLAGS="-DBOOST_TEST_DYN_LINK" - fi + BOOST_TRY_LIB=unit_test_framework + BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" + PION_TESTS_CPPFLAGS="-DBOOST_TEST_DYN_LINK" LIBS_SAVED="$LIBS" - LIBS="$LIBS_SAVED ${BOOST_TRY_LINK}" + LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS ${PION_TESTS_CPPFLAGS}" AC_MSG_CHECKING([for boost::test library]) AC_TRY_LINK([#include using namespace boost::unit_test; - test_suite* init_unit_test_suite( int argc, char* argv[] ) + test_suite* init_unit_test_suite( int, char** ) { return BOOST_TEST_SUITE("Master test suite"); }], [], [ AC_MSG_RESULT(ok) - BOOST_TEST_LIB="${BOOST_TRY_LINK}" + BOOST_TEST_LIB="-l${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) diff --git a/build/pion-setup.inc b/build/pion-setup.inc index 57cd7938f..6b1dca150 100644 --- a/build/pion-setup.inc +++ b/build/pion-setup.inc @@ -30,8 +30,8 @@ case "$build_os" in # Solaris: GCC compiler CPPFLAGS="$CPPFLAGS -pthreads -D_REENTRANT" LDFLAGS="$LDFLAGS -pthreads" - PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" - PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" + PION_OPT_FLAGS="-O2 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -DNDEBUG" + PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -fkeep-inline-functions" fi PION_EXTERNAL_LIBS="-lsocket -lnsl -lposix4" ;; @@ -40,9 +40,9 @@ case "$build_os" in # -pthread is implied (automatically set by compiler) CPPFLAGS="$CPPFLAGS -D_REENTRANT" #LDFLAGS="$LDFLAGS" - #PION_OPT_FLAGS="-O3 -ggdb -fomit-frame-pointer -fstrict-aliasing -fno-tree-pre -falign-loops -Wall -Wno-strict-aliasing -DNDEBUG" - PION_OPT_FLAGS="-O3 -ggdb -fomit-frame-pointer -fstrict-aliasing -Wall -Wno-strict-aliasing -DNDEBUG" - PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" + #PION_OPT_FLAGS="-O3 -ggdb -fomit-frame-pointer -fstrict-aliasing -fno-tree-pre -falign-loops -Wall -Wextra -Werror -Wno-strict-aliasing -DNDEBUG" + PION_OPT_FLAGS="-O3 -ggdb -fomit-frame-pointer -fstrict-aliasing -Wall -Wextra -Werror -Wno-strict-aliasing -DNDEBUG" + PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -fkeep-inline-functions" # Check for OSX binary architecture AC_MSG_CHECKING([for OSX binary architectures]) @@ -71,24 +71,32 @@ case "$build_os" in # Cygwin GCC compiler (Windows) CPPFLAGS="$CPPFLAGS -mthreads -D_REENTRANT -DPION_WIN32 -D__USE_W32_SOCKETS" LDFLAGS="$LDFLAGS -mthreads -Wl,-E" - PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" - PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" + PION_OPT_FLAGS="-O2 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -DNDEBUG" + PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -fkeep-inline-functions" + PION_EXTERNAL_LIBS="-lws2_32 -lmswsock" + ;; +*mingw32*) + # MingW32 GCC compiler (Windows) + CPPFLAGS="$CPPFLAGS -pthread -D_REENTRANT -DPION_WIN32 -D__USE_W32_SOCKETS" + LDFLAGS="$LDFLAGS -pthread -Wl,-E" + PION_OPT_FLAGS="-O1 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -DNDEBUG" + PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -fkeep-inline-functions" PION_EXTERNAL_LIBS="-lws2_32 -lmswsock" ;; *freebsd*) # FreeBSD: GCC compiler CPPFLAGS="$CPPFLAGS -pthread -D_REENTRANT" LDFLAGS="$LDFLAGS -pthread -Wl,-E" - PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" - PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" + PION_OPT_FLAGS="-O2 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -DNDEBUG" + PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -fkeep-inline-functions" ;; *) # Other (Linux): GCC compiler CPPFLAGS="$CPPFLAGS -pthread -D_REENTRANT" LDFLAGS="$LDFLAGS -pthread -Wl,-E" LIBS="-lrt -ldl" - PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" - PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" + PION_OPT_FLAGS="-O2 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -DNDEBUG" + PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wextra -Werror -Wno-strict-aliasing -fkeep-inline-functions" ;; esac diff --git a/cmake/PionUtils.cmake b/cmake/PionUtils.cmake index 900a987bd..672b57027 100644 --- a/cmake/PionUtils.cmake +++ b/cmake/PionUtils.cmake @@ -35,12 +35,12 @@ macro(pion_update_compilation_opts) if(CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -W") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Werror -W") endif() endif() if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -W") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Werror -W") endif() message("CMAKE_CXX_COMPILER_VERSION = ${CMAKE_CXX_COMPILER_VERSION}") diff --git a/include/pion/http/auth.hpp b/include/pion/http/auth.hpp index 2695515d2..73b44606f 100644 --- a/include/pion/http/auth.hpp +++ b/include/pion/http/auth.hpp @@ -65,7 +65,7 @@ class PION_API auth : * @param name the name of the option to change * @param value the value of the option */ - virtual void set_option(const std::string& name, const std::string& value) { + virtual void set_option(const std::string& name, const std::string& /* value */) { BOOST_THROW_EXCEPTION( error::bad_arg() << error::errinfo_arg_name(name) ); } diff --git a/include/pion/http/parser.hpp b/include/pion/http/parser.hpp index b48988b9e..1ee243787 100644 --- a/include/pion/http/parser.hpp +++ b/include/pion/http/parser.hpp @@ -441,7 +441,7 @@ class PION_API parser : protected: /// Called after we have finished parsing the HTTP message headers - virtual void finished_parsing_headers(const boost::system::error_code& ec) {} + virtual void finished_parsing_headers(const boost::system::error_code& /* ec */) {} /** * parses an HTTP message up to the end of the headers using bytes diff --git a/include/pion/http/plugin_service.hpp b/include/pion/http/plugin_service.hpp index 5ab4a9295..be8c17584 100644 --- a/include/pion/http/plugin_service.hpp +++ b/include/pion/http/plugin_service.hpp @@ -51,7 +51,7 @@ class plugin_service : * @param name the name of the option to change * @param value the value of the option */ - virtual void set_option(const std::string& name, const std::string& value) { + virtual void set_option(const std::string& name, const std::string& /* value */) { BOOST_THROW_EXCEPTION( error::bad_arg() << error::errinfo_arg_name(name) ); } diff --git a/include/pion/http/request_writer.hpp b/include/pion/http/request_writer.hpp index ee9c708df..8d1b9008b 100644 --- a/include/pion/http/request_writer.hpp +++ b/include/pion/http/request_writer.hpp @@ -139,6 +139,8 @@ class request_writer : virtual void handle_write(const boost::system::error_code& write_error, std::size_t bytes_written) { + (void)bytes_written; + logger log_ptr(get_logger()); if (! write_error) { // request sent OK diff --git a/include/pion/http/response_writer.hpp b/include/pion/http/response_writer.hpp index aaf3da033..3e134e17d 100644 --- a/include/pion/http/response_writer.hpp +++ b/include/pion/http/response_writer.hpp @@ -147,6 +147,8 @@ class PION_API response_writer : virtual void handle_write(const boost::system::error_code& write_error, std::size_t bytes_written) { + (void)bytes_written; + logger log_ptr(get_logger()); if (!write_error) { // response sent OK diff --git a/include/pion/logger.hpp b/include/pion/logger.hpp index 3e1634bdd..ca58c7c1a 100644 --- a/include/pion/logger.hpp +++ b/include/pion/logger.hpp @@ -206,10 +206,10 @@ } #undef PION_HAS_LOG_APPENDER - #define PION_LOG_CONFIG_BASIC {} + #define PION_LOG_CONFIG_BASIC (void)0 #define PION_LOG_CONFIG(FILE) {} #define PION_GET_LOGGER(NAME) 0 - #define PION_SHUTDOWN_LOGGER 0 + #define PION_SHUTDOWN_LOGGER (void)0 // use LOG to avoid warnings about LOG not being used #define PION_LOG_SETLEVEL_DEBUG(LOG) { if (LOG) {} } diff --git a/include/pion/process.hpp b/include/pion/process.hpp index fd2f87fc6..995c9c262 100644 --- a/include/pion/process.hpp +++ b/include/pion/process.hpp @@ -18,7 +18,7 @@ #include // Dump file generation support on Windows -#ifdef _MSC_VER +#ifdef PION_WIN32 #include #include #include @@ -57,14 +57,14 @@ class PION_API process : /// fork process and run as a background daemon static void daemonize(void); -#ifdef _MSC_VER +#ifdef PION_WIN32 class dumpfile_init_exception : public std::exception { public: dumpfile_init_exception(const std::string& cause) : m_cause(cause) {} - virtual const char* what() const { return m_cause.c_str(); } + virtual const char* what() const throw() { return m_cause.c_str(); } protected: std::string m_cause; }; @@ -89,7 +89,7 @@ class PION_API process : /// data type for static/global process configuration information struct config_type { /// constructor just initializes native types -#ifdef _MSC_VER +#ifdef PION_WIN32 config_type() : shutdown_now(false), h_dbghelp(NULL), p_dump_proc(NULL) {} #else config_type() : shutdown_now(false) {} @@ -105,7 +105,7 @@ class PION_API process : boost::mutex shutdown_mutex; // Dump file generation support on Windows -#ifdef _MSC_VER +#ifdef PION_WIN32 /// mini-dump file location std::string dumpfile_dir; diff --git a/include/pion/scheduler.hpp b/include/pion/scheduler.hpp index dae69acbe..bc2369b31 100644 --- a/include/pion/scheduler.hpp +++ b/include/pion/scheduler.hpp @@ -201,7 +201,7 @@ class PION_API multi_thread_scheduler : { public: - /// constructs a new single_service_scheduler + /// constructs a new multi_thread_scheduler multi_thread_scheduler(void) {} /// virtual destructor diff --git a/include/pion/test/unit_test.hpp b/include/pion/test/unit_test.hpp index 1213d1181..60e35f664 100644 --- a/include/pion/test/unit_test.hpp +++ b/include/pion/test/unit_test.hpp @@ -55,7 +55,7 @@ namespace test { // begin namespace test /// wrapper to flush output for xml_log_formatter::log_start virtual void log_start(std::ostream& ostr, - boost::unit_test::counter_t test_cases_amount ) + boost::unit_test::counter_t /* test_cases_amount */) { ostr << "" << std::endl; } diff --git a/services/FileService.cpp b/services/FileService.cpp index 8d236f4f6..24afcf447 100644 --- a/services/FileService.cpp +++ b/services/FileService.cpp @@ -937,7 +937,7 @@ void DiskFileSender::send(void) } void DiskFileSender::handle_write(const boost::system::error_code& write_error, - std::size_t bytes_written) + std::size_t /* bytes_written */) { bool finished_sending = true; diff --git a/src/admin_rights.cpp b/src/admin_rights.cpp index 0e9a49a54..5d28618e3 100644 --- a/src/admin_rights.cpp +++ b/src/admin_rights.cpp @@ -9,7 +9,7 @@ #include -#ifndef _MSC_VER +#ifndef PION_WIN32 #include #include #include @@ -31,7 +31,7 @@ boost::mutex admin_rights::m_mutex; // admin_rights member functions -#ifdef _MSC_VER +#ifdef PION_WIN32 admin_rights::admin_rights(bool use_log) : m_logger(PION_GET_LOGGER("pion.admin_rights")), @@ -41,23 +41,23 @@ admin_rights::admin_rights(bool use_log) void admin_rights::release(void) {} -long admin_rights::run_as_user(const std::string& user_name) +long admin_rights::run_as_user(const std::string& /* user_name */) { return -1; } -long admin_rights::run_as_group(const std::string& group_name) +long admin_rights::run_as_group(const std::string& /* group_name */) { return -1; } -long admin_rights::find_system_id(const std::string& name, - const std::string& file) +long admin_rights::find_system_id(const std::string& /* name */, + const std::string& /* file */) { return -1; } -#else // NOT #ifdef _MSC_VER +#else // NOT #ifdef PION_WIN32 admin_rights::admin_rights(bool use_log) : m_logger(PION_GET_LOGGER("pion.admin_rights")), @@ -154,7 +154,7 @@ long admin_rights::find_system_id(const std::string& name, return system_id; } -#endif // #ifdef _MSC_VER +#endif // #ifdef PION_WIN32 } // end namespace pion diff --git a/src/http_parser.cpp b/src/http_parser.cpp index 048f8df8c..f16b14c4b 100644 --- a/src/http_parser.cpp +++ b/src/http_parser.cpp @@ -1422,7 +1422,7 @@ boost::tribool parser::parse_chunks(http::message::chunk_cache_t& chunks, } boost::tribool parser::consume_content(http::message& http_msg, - boost::system::error_code& ec) + boost::system::error_code& /* ec */) { size_t content_bytes_to_read; size_t content_bytes_available = bytes_available(); diff --git a/src/plugin.cpp b/src/plugin.cpp index ce7c33032..ab1804139 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -53,6 +53,9 @@ void plugin::check_cygwin_path(boost::filesystem::path& final_path, if (! final_path.is_complete() && final_path.has_root_directory()) { final_path = boost::filesystem::path(std::string(PION_CYGWIN_DIRECTORY) + start_path); } +#else + (void)final_path; + (void)start_path; #endif } @@ -372,6 +375,7 @@ void plugin::close_dynamic_library(void *lib_handle) // So, please don't call FreeLibrary here unless you've been able to // reproduce and fix the crashing of the unit tests. + (void)lib_handle; //FreeLibrary((HINSTANCE) lib_handle); #else dlclose(lib_handle); diff --git a/src/process.cpp b/src/process.cpp index 4af7e3296..bfd028a2a 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -8,7 +8,7 @@ // #include -#ifndef _MSC_VER +#ifndef PION_WIN32 #include #include #include @@ -57,7 +57,7 @@ void process::create_config(void) -#ifdef _MSC_VER +#ifdef PION_WIN32 BOOL WINAPI console_ctrl_handler(DWORD ctrl_type) { @@ -182,7 +182,7 @@ LONG WINAPI process::unhandled_exception_filter(struct _EXCEPTION_POINTERS *pExc ExInfo.ThreadId = ::GetCurrentThreadId(); ExInfo.ExceptionPointers = pExceptionInfo; - ExInfo.ClientPointers = NULL; + ExInfo.ClientPointers = 0; // write the dump BOOL bOK = cfg.p_dump_proc(GetCurrentProcess(), GetCurrentProcessId(), hFile, MiniDumpNormal, &ExInfo, NULL, NULL ); @@ -217,9 +217,9 @@ void process::daemonize(void) // not supported } -#else // NOT #ifdef _MSC_VER +#else // NOT #ifdef PION_WIN32 -void handle_signal(int sig) +void handle_signal(int /* sig */) { process::shutdown(); } @@ -268,6 +268,6 @@ void process::daemonize(void) umask(027); } -#endif // #ifdef _MSC_VER +#endif // #ifdef PION_WIN32 } // end namespace pion diff --git a/src/spdy_parser.cpp b/src/spdy_parser.cpp index d6e8b13e4..254b1be22 100644 --- a/src/spdy_parser.cpp +++ b/src/spdy_parser.cpp @@ -349,10 +349,9 @@ void parser::parse_header_payload(boost::system::error_code &ec, decompressor_ptr& decompressor, const spdy_control_frame_info& frame, http_protocol_info& http_info, - boost::uint32_t current_stream_count) + boost::uint32_t /* current_stream_count */) { boost::uint32_t stream_id = 0; - boost::uint32_t associated_stream_id; boost::uint32_t header_block_length = frame.length; // Get the 31 bit stream id @@ -368,11 +367,7 @@ void parser::parse_header_payload(boost::system::error_code &ec, if (frame.type == SPDY_SYN_STREAM) { - // Get associated stream ID. - - boost::uint32_t four_bytes = algorithm::to_uint32(m_read_ptr); - associated_stream_id = four_bytes & 0x7FFFFFFF; - + // Ignore associated stream ID. m_read_ptr += 4; // The next bits are priority, unused, and slot. @@ -463,9 +458,9 @@ void parser::parse_header_payload(boost::system::error_code &ec, } } -void parser::parse_spdy_data(boost::system::error_code &ec, +void parser::parse_spdy_data(boost::system::error_code& /* ec */, const spdy_control_frame_info& frame, - boost::uint32_t stream_id, + boost::uint32_t /* stream_id */, http_protocol_info& http_info) { // This marks the finish flag @@ -474,10 +469,9 @@ void parser::parse_spdy_data(boost::system::error_code &ec, } } -void parser::parse_spdy_rst_stream(boost::system::error_code &ec, +void parser::parse_spdy_rst_stream(boost::system::error_code& /* ec */, const spdy_control_frame_info& frame) { - boost::uint32_t stream_id = 0; boost::uint32_t status_code = 0; // First complete the check for size and flag @@ -486,11 +480,7 @@ void parser::parse_spdy_rst_stream(boost::system::error_code &ec, return; } - // Get the 31 bit stream id - - boost::uint32_t four_bytes = algorithm::to_uint32(m_read_ptr); - stream_id = four_bytes & 0x7FFFFFFF; - + // Ignore the 31 bit stream id m_read_ptr += 4; // Get the status code @@ -505,7 +495,7 @@ void parser::parse_spdy_rst_stream(boost::system::error_code &ec, } } -void parser::parse_spdy_ping_frame(boost::system::error_code &ec, +void parser::parse_spdy_ping_frame(boost::system::error_code& /* ec */, const spdy_control_frame_info& frame) { // First complete the check for size @@ -519,14 +509,15 @@ void parser::parse_spdy_ping_frame(boost::system::error_code &ec, // Get the 32 bit ping id ping_id = algorithm::to_uint32(m_read_ptr); + (void)ping_id; m_read_ptr += 4; PION_LOG_INFO(m_logger, "SPDY " << "Ping ID is : " << ping_id); } -void parser::parse_spdy_settings_frame(boost::system::error_code &ec, - const spdy_control_frame_info& frame) +void parser::parse_spdy_settings_frame(boost::system::error_code& /* ec */, + const spdy_control_frame_info& /* frame */) { // Can ignore this frame for our purposes } @@ -540,14 +531,9 @@ void parser::parse_spdy_goaway_frame(boost::system::error_code &ec, return; } - boost::uint32_t last_good_stream_id = 0; boost::uint32_t status_code = 0; - // Get the 31 bit stream id - - boost::uint32_t four_bytes = algorithm::to_uint32(m_read_ptr); - last_good_stream_id = four_bytes & 0x7FFFFFFF; - + // Ignore the 31 bit stream id m_read_ptr += 4; // Get the status code @@ -571,8 +557,8 @@ void parser::parse_spdy_goaway_frame(boost::system::error_code &ec, } -void parser::parse_spdy_window_update_frame(boost::system::error_code &ec, - const spdy_control_frame_info& frame) +void parser::parse_spdy_window_update_frame(boost::system::error_code& /* ec */, + const spdy_control_frame_info& /* frame */) { // TBD : Do we really need this for our purpose } diff --git a/src/tcp_server.cpp b/src/tcp_server.cpp index 0923921de..c1d0ba158 100644 --- a/src/tcp_server.cpp +++ b/src/tcp_server.cpp @@ -85,7 +85,7 @@ void server::start(void) m_tcp_acceptor.open(m_endpoint.protocol()); // allow the acceptor to reuse the address (i.e. SO_REUSEADDR) // ...except when running not on Windows - see http://msdn.microsoft.com/en-us/library/ms740621%28VS.85%29.aspx -#ifndef _MSC_VER +#ifndef PION_WIN32 m_tcp_acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); #endif m_tcp_acceptor.bind(m_endpoint); diff --git a/src/tcp_timer.cpp b/src/tcp_timer.cpp index 8e0ff3ea3..ca382d9e9 100644 --- a/src/tcp_timer.cpp +++ b/src/tcp_timer.cpp @@ -40,7 +40,7 @@ void timer::cancel(void) m_timer.cancel(); } -void timer::timer_callback(const boost::system::error_code& ec) +void timer::timer_callback(const boost::system::error_code& /* ec */) { boost::mutex::scoped_lock timer_lock(m_mutex); m_timer_active = false; diff --git a/tests/http_plugin_server_tests.cpp b/tests/http_plugin_server_tests.cpp index 33f459a1b..7b6ada1f5 100644 --- a/tests/http_plugin_server_tests.cpp +++ b/tests/http_plugin_server_tests.cpp @@ -157,6 +157,8 @@ void ChunkedPostRequestSender::send(void) void ChunkedPostRequestSender::handle_write(const boost::system::error_code& write_error, std::size_t bytes_written) { + (void)bytes_written; + if (write_error) { // encountered error sending request data m_writer->get_connection()->set_lifecycle(pion::tcp::connection::LIFECYCLE_CLOSE); // make sure it will get closed @@ -241,7 +243,7 @@ class WebServerTests_F { if (boost::regex_match(rsp_line, rx_matches, regex_response_end)) break; // check validity of response header - BOOST_REQUIRE(boost::regex_match(rsp_line, rx_matches, regex_response_header)); + BOOST_REQUIRE(boost::regex_match(rsp_line, regex_response_header)); // check for content-length response header if (boost::regex_match(rsp_line, rx_matches, regex_content_length_header)) { if (rx_matches.size() == 2) @@ -1119,7 +1121,7 @@ class ContentResponseWithoutLengthTests_F /// checks the validity of the HTTP response void checkResponse(http::response_ptr& http_response_ptr, - tcp::connection_ptr& conn_ptr, const boost::system::error_code& ec) + tcp::connection_ptr& /* conn_ptr */, const boost::system::error_code& /* ec */) { checkResponse(*http_response_ptr); boost::mutex::scoped_lock async_lock(m_mutex); diff --git a/tests/process_tests.cpp b/tests/process_tests.cpp index 702b182f1..14b9fd77b 100644 --- a/tests/process_tests.cpp +++ b/tests/process_tests.cpp @@ -21,7 +21,7 @@ class ProcessTest_F : public process BOOST_FIXTURE_TEST_SUITE(ProcessTest_S, ProcessTest_F) -#ifdef _MSC_VER +#ifdef PION_WIN32 BOOST_AUTO_TEST_CASE(checkSetDumpfileDirectory) { // check that invalid input results in an exception