From 3cfc484d8d97380a60bfac72ef119f9c534e74fc Mon Sep 17 00:00:00 2001 From: Gennadiy Rozental Date: Mon, 23 Nov 2009 03:04:38 +0000 Subject: [PATCH] More warnings silenced [SVN r57856] --- test/boost_check_equal_str.cpp | 2 +- test/foreach_test.cpp | 4 ++++ test/result_report_test.cpp | 2 ++ test/test_tools_test.cpp | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/boost_check_equal_str.cpp b/test/boost_check_equal_str.cpp index c495b1fb..325543d0 100644 --- a/test/boost_check_equal_str.cpp +++ b/test/boost_check_equal_str.cpp @@ -19,8 +19,8 @@ BOOST_AUTO_TEST_CASE( check_string_compare ) { char const* buf_ptr_cch = "abc"; char const buf_array_cch[] = "abc"; - char* buf_ptr_ch = "abc"; char buf_array_ch[] = "abc"; + char* buf_ptr_ch = buf_array_ch; std::string buf_str = "abc"; BOOST_CHECK_EQUAL(buf_ptr_cch, buf_ptr_cch); diff --git a/test/foreach_test.cpp b/test/foreach_test.cpp index 3468ab84..7034bc57 100644 --- a/test/foreach_test.cpp +++ b/test/foreach_test.cpp @@ -20,6 +20,10 @@ #include +#ifdef BOOST_MSVC +#pragma warning(disable:4702) // Unreachable code +#endif + template void baz( std::listconst& list_of_T ) { diff --git a/test/result_report_test.cpp b/test/result_report_test.cpp index 3a13a219..576771d4 100644 --- a/test/result_report_test.cpp +++ b/test/result_report_test.cpp @@ -58,6 +58,7 @@ struct log_guard { void very_bad_foo() { log_guard lg; + ut_detail::ignore_unused_variable_warning( lg ); onullstream_type null_out; unit_test_log.set_stream( null_out ); BOOST_FAIL( "" ); @@ -105,6 +106,7 @@ struct guard { BOOST_AUTO_TEST_CASE( test_result_reports ) { guard G; + ut_detail::ignore_unused_variable_warning( G ); #define PATTERN_FILE_NAME "result_report_test.pattern" diff --git a/test/test_tools_test.cpp b/test/test_tools_test.cpp index 8e329da0..a23e1265 100644 --- a/test/test_tools_test.cpp +++ b/test/test_tools_test.cpp @@ -503,7 +503,7 @@ TEST_CASE( test_BOOST_CHECK_BITWISE_EQUAL ) //____________________________________________________________________________// struct A { - friend std::ostream& operator<<( std::ostream& str, A const& a ) { str << "struct A"; return str;} + friend std::ostream& operator<<( std::ostream& str, A const& ) { str << "struct A"; return str;} }; TEST_CASE( test_BOOST_TEST_MESSAGE )