Suppressing warnings. Please report any problems (may have broken something!)

[SVN r58072]
This commit is contained in:
Emil Dotchevski
2009-12-01 02:16:50 +00:00
parent 3ab1c234f5
commit 8d24c87032
26 changed files with 600 additions and 490 deletions

View File

@ -6,6 +6,11 @@
#include <boost/throw_exception.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <boost/config.hpp>
#ifdef BOOST_MSVC
#pragma warning(disable:4702) //unreachable code
#endif
class my_exception: public std::exception { };
int

View File

@ -7,6 +7,11 @@
#include <boost/throw_exception.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <boost/config.hpp>
#ifdef BOOST_MSVC
#pragma warning(disable:4702) //unreachable code
#endif
class my_exception: public std::exception { };
int

View File

@ -7,7 +7,11 @@
import testing ;
project : requirements <exception-handling>on ;
project
: requirements
<exception-handling>on
<warnings>all
;
#to_string
@ -45,7 +49,6 @@ compile-fail error_info_const_fail.cpp ;
compile exception_ptr_hpp_test.cpp ;
compile diagnostic_information_hpp_test.cpp ;
compile error_info_hpp_test.cpp ;
compile exception_hpp_test.cpp ;
compile get_error_info_hpp_test.cpp ;
compile info_hpp_test.cpp ;
compile info_tuple_hpp_test.cpp ;

View File

@ -10,9 +10,10 @@
#include <boost/detail/workaround.hpp>
#include <string>
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
struct my_tag {};
#endif
#include <boost/config.hpp>
#ifdef BOOST_MSVC
#pragma warning(disable:4512) //assignment operator could not be generated
#endif
typedef boost::error_info<struct my_tag,int> my_info;
@ -556,7 +557,7 @@ main()
}
try
{
throw boost::enable_current_exception(derives_std_boost_exception("what2") << boost::errinfo_nested_exception(p) );
throw boost::enable_current_exception(derives_std_boost_exception("what2") << boost::errinfo_nested_exception(p) );
}
catch(
... )

View File

@ -17,6 +17,11 @@
#include <boost/detail/lightweight_test.hpp>
#include <exception>
#include <boost/config.hpp>
#ifdef BOOST_MSVC
#pragma warning(disable:4702) //unreachable code
#endif
struct
test_exception:
virtual boost::exception,
@ -43,7 +48,7 @@ main()
#else
BOOST_THROW_EXCEPTION(e<<errinfo_type_info_name(typeid(int).name()));
#endif
BOOST_TEST(false);
BOOST_ERROR("BOOST_THROW_EXCEPTION failed to throw.");
}
catch(
boost::exception & e )

View File

@ -9,10 +9,6 @@
#include <boost/detail/workaround.hpp>
#include <errno.h>
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
struct tag_errno {};
#endif
typedef boost::error_info<struct tag_errno,int> info_errno;
class
@ -28,7 +24,6 @@ main()
{
errno=1;
throw my_exception() << info_errno(errno);
BOOST_TEST(false);
}
catch(
my_exception & x )

View File

@ -8,6 +8,12 @@
#include <boost/detail/lightweight_test.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/config.hpp>
#ifdef BOOST_MSVC
#pragma warning(disable:4702) //unreachable code
#pragma warning(disable:4512) //assignment operator could not be generated
#endif
struct throws_on_copy;
struct non_printable { };
@ -35,16 +41,6 @@ user_data
}
};
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610))
struct tag_test_1 {};
struct tag_test_2 {};
struct tag_test_3 {};
struct tag_test_4 {};
struct tag_test_5 {};
struct tag_test_6 {};
struct tag_user_data {};
#endif
typedef boost::error_info<struct tag_test_1,int> test_1;
typedef boost::error_info<struct tag_test_2,unsigned int> test_2;
typedef boost::error_info<struct tag_test_3,float> test_3;
@ -318,7 +314,6 @@ test_lifetime()
try
{
throw test_exception() << test_7(user_data(count));
BOOST_TEST(false);
}
catch(
boost::exception & x )

View File

@ -9,6 +9,11 @@
#include <boost/exception_ptr.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <boost/config.hpp>
#ifdef BOOST_MSVC
#pragma warning(disable:4702) //unreachable code
#endif
typedef boost::error_info<struct tag_test_int,int> test_data;
struct
@ -30,7 +35,7 @@ boost_throw_exception_test()
try
{
BOOST_THROW_EXCEPTION(exception1());
BOOST_TEST(false);
BOOST_ERROR("BOOST_THROW_EXCEPTION failed to throw.");
}
catch(
boost::exception & x )
@ -40,7 +45,7 @@ boost_throw_exception_test()
int const * line=boost::get_error_info<boost::throw_line>(x);
BOOST_TEST( file && *file );
BOOST_TEST( function && *function );
BOOST_TEST( line && *line==32 );
BOOST_TEST( line && *line==37 );
}
catch(
... )
@ -50,7 +55,7 @@ boost_throw_exception_test()
try
{
BOOST_THROW_EXCEPTION(exception2() << test_data(42));
BOOST_TEST(false);
BOOST_ERROR("BOOST_THROW_EXCEPTION failed to throw.");
}
catch(
boost::exception & x )
@ -61,7 +66,7 @@ boost_throw_exception_test()
int const * data=boost::get_error_info<test_data>(x);
BOOST_TEST( file && *file );
BOOST_TEST( function && *function );
BOOST_TEST( line && *line==52 );
BOOST_TEST( line && *line==57 );
BOOST_TEST( data && *data==42 );
}
catch(