diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index df613523..314ab4bd 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1,13 +1,19 @@ # # Copyright John Maddock 2008. -# Use, modification and distribution are subject to the -# Boost Software License, Version 1.0. (See accompanying file +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # # If you need to alter build preferences then set them in # the template defined in options_v2.jam. # +project + : requirements + gcc:-Wno-deprecated-declarations +; + + import modules ; local is_unix = [ modules.peek : UNIX ] ; @@ -24,20 +30,20 @@ if $(is_unix) } test-suite config - : + : [ compile config_test_c.c ] - [ run config_test.cpp + [ run config_test.cpp : #args : #input-files : #requirements multi : config_test_threaded ] - [ run config_test.cpp + [ run config_test.cpp : #args : #input-files : #requirements - single msvc:static msvc:static + single msvc:static msvc:static linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) diff --git a/test/boost_has_hash.ipp b/test/boost_has_hash.ipp index a3afbb2c..0363940d 100644 --- a/test/boost_has_hash.ipp +++ b/test/boost_has_hash.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -13,10 +13,11 @@ #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 # ifdef BOOST_NO_CXX11_STD_UNORDERED # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx +# define _BACKWARD_BACKWARD_WARNING_H 1 /* turn off warnings from the headers below */ # include # include # else - // If we have BOOST_NO_CXX11_STD_UNORDERED *not* defined, then we must + // If we have BOOST_NO_CXX11_STD_UNORDERED *not* defined, then we must // not include the headers as they clash with the C++0x // headers. ie in any given translation unit we can include one // or the other, but not both. diff --git a/test/boost_has_nrvo.ipp b/test/boost_has_nrvo.ipp index 2611b4ec..ad6f17f6 100644 --- a/test/boost_has_nrvo.ipp +++ b/test/boost_has_nrvo.ipp @@ -1,7 +1,7 @@ // (C) Copyright Terje Slettebo 2001. -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -18,7 +18,7 @@ class test_class { public: test_class() {} - test_class(const test_class &other) + test_class(const test_class&) { ++copy_count; } diff --git a/test/boost_no_auto_declarations.ipp b/test/boost_no_auto_declarations.ipp index ce526eb8..9201b160 100644 --- a/test/boost_no_auto_declarations.ipp +++ b/test/boost_no_auto_declarations.ipp @@ -11,7 +11,7 @@ namespace boost_no_cxx11_auto_declarations { -void check_f(int& x) +void check_f(int&) { } diff --git a/test/boost_no_auto_multidecl.ipp b/test/boost_no_auto_multidecl.ipp index fe22cadc..8fb7d5e4 100644 --- a/test/boost_no_auto_multidecl.ipp +++ b/test/boost_no_auto_multidecl.ipp @@ -11,7 +11,7 @@ namespace boost_no_cxx11_auto_multideclarations { -void check_f(int& x, int*& y) +void check_f(int&, int*&) { } diff --git a/test/boost_no_char16_t.ipp b/test/boost_no_char16_t.ipp index 8e7fbae1..4efff95e 100644 --- a/test/boost_no_char16_t.ipp +++ b/test/boost_no_char16_t.ipp @@ -24,8 +24,8 @@ void f(const unsigned long*){} int test() { - const char16_t* p; - f(p); + const char16_t p(0); + f(&p); return 0; } diff --git a/test/boost_no_char32_t.ipp b/test/boost_no_char32_t.ipp index 062215c9..9778bff0 100644 --- a/test/boost_no_char32_t.ipp +++ b/test/boost_no_char32_t.ipp @@ -23,8 +23,8 @@ void f(const unsigned long*){} int test() { - const char32_t* p; - f(p); + const char32_t p(0); + f(&p); return 0; } diff --git a/test/boost_no_cxx11_allocator.ipp b/test/boost_no_cxx11_allocator.ipp index 2865fb7d..ad14bdef 100644 --- a/test/boost_no_cxx11_allocator.ipp +++ b/test/boost_no_cxx11_allocator.ipp @@ -17,6 +17,7 @@ namespace boost_no_cxx11_allocator { int test() { std::pointer_traits* p = 0; + (void) p; //std::pointer_safety s = std::relaxed; //char* (*l_undeclare_reachable)(char *p) = std::undeclare_reachable; @@ -28,6 +29,9 @@ int test() std::uses_allocator > ua; std::allocator_traits > at; + (void)aat; + (void)ua; + (void)at; return 0; } diff --git a/test/boost_no_cxx11_hdr_array.ipp b/test/boost_no_cxx11_hdr_array.ipp index 79ad7290..7bbead1c 100644 --- a/test/boost_no_cxx11_hdr_array.ipp +++ b/test/boost_no_cxx11_hdr_array.ipp @@ -16,7 +16,7 @@ namespace boost_no_cxx11_hdr_array { int test() { - std::array a = { 1, 2, 3 }; + std::array a = {{ 1, 2, 3 }}; return a.size() == 3 ? 0 : 1; } diff --git a/test/boost_no_cxx11_hdr_initializer_list.ipp b/test/boost_no_cxx11_hdr_initializer_list.ipp index 3efcce94..e7ee8389 100644 --- a/test/boost_no_cxx11_hdr_initializer_list.ipp +++ b/test/boost_no_cxx11_hdr_initializer_list.ipp @@ -14,7 +14,7 @@ namespace boost_no_cxx11_hdr_initializer_list { -void foo(const std::initializer_list& l) +void foo(const std::initializer_list&) { } diff --git a/test/boost_no_cxx11_smart_ptr.ipp b/test/boost_no_cxx11_smart_ptr.ipp index 817a0249..5b563df7 100644 --- a/test/boost_no_cxx11_smart_ptr.ipp +++ b/test/boost_no_cxx11_smart_ptr.ipp @@ -26,6 +26,9 @@ int test() std::hash > h1; std::hash > h2; + (void)h1; + (void)h2; + return 0; } diff --git a/test/boost_no_decltype.ipp b/test/boost_no_decltype.ipp index d361d201..0b059243 100644 --- a/test/boost_no_decltype.ipp +++ b/test/boost_no_decltype.ipp @@ -40,11 +40,11 @@ void baz(F f) int test() { int i; - decltype(i) j; -// quiet_warning(j); + decltype(i) j(0); + quiet_warning(j); decltype(get_test_class()) k; - #ifndef _MSC_VER - // Although the VC++ decltype is buggy, we none the less enable support, + #ifndef _MSC_VER + // Although the VC++ decltype is buggy, we none the less enable support, // so don't test the bugs for now! baz(get_test_class); #endif diff --git a/test/boost_no_is_abstract.ipp b/test/boost_no_is_abstract.ipp index d44695c8..257318ee 100644 --- a/test/boost_no_is_abstract.ipp +++ b/test/boost_no_is_abstract.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock and Dave Abrahams 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock and Dave Abrahams 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -46,7 +46,7 @@ struct abstract{ virtual void foo() = 0; }; int test() { - return is_abstract_test::value == is_abstract_test::value; + return static_cast(is_abstract_test::value) == static_cast(is_abstract_test::value); } } diff --git a/test/boost_no_std_wstreambuf.ipp b/test/boost_no_std_wstreambuf.ipp index 1be252ee..45de2426 100644 --- a/test/boost_no_std_wstreambuf.ipp +++ b/test/boost_no_std_wstreambuf.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -35,7 +35,7 @@ protected: private: parser_buf& operator=(const parser_buf&) { return *this; }; - parser_buf(const parser_buf&){}; + parser_buf(const parser_buf&); }; template @@ -56,7 +56,7 @@ parser_buf::seekoff(off_type off, ::std::ios_base::seekdir way, : int size = this->egptr() - this->eback(); int pos = this->gptr() - this->eback(); charT* g = this->eback(); - switch(way) + switch((int)way) { case ::std::ios_base::beg: if((off < 0) || (off > size)) diff --git a/test/boost_no_stdc_namespace.ipp b/test/boost_no_stdc_namespace.ipp index 993aec74..3ff3f494 100644 --- a/test/boost_no_stdc_namespace.ipp +++ b/test/boost_no_stdc_namespace.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -29,12 +29,12 @@ int test() { char c = 0; #ifndef BOOST_NO_CTYPE_FUNCTIONS - std::isspace(c); - std::isalpha(c); - std::ispunct(c); + (void)std::isspace(c); + (void)std::isalpha(c); + (void)std::ispunct(c); #endif (void)std::strlen(&c); - std::clock(); + (void)std::clock(); return 0; } diff --git a/test/boost_no_tem_local_classes.ipp b/test/boost_no_tem_local_classes.ipp index 04e07b87..876980ec 100644 --- a/test/boost_no_tem_local_classes.ipp +++ b/test/boost_no_tem_local_classes.ipp @@ -19,7 +19,7 @@ namespace boost_no_cxx11_local_class_template_parameters { template struct a { void use() {} }; -template void f(T x) {} +template void f(T) {} int test() { class local_class {} local_obj; diff --git a/test/boost_no_template_streams.ipp b/test/boost_no_template_streams.ipp index 3379d590..bb24e132 100644 --- a/test/boost_no_template_streams.ipp +++ b/test/boost_no_template_streams.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2008. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -17,6 +17,7 @@ namespace boost_no_templated_iostreams{ int test() { std::basic_ostream >& osr = std::cout; + (void)osr; return 0; } diff --git a/test/boost_no_typeid.ipp b/test/boost_no_typeid.ipp index 3b127d5f..72dd4d3d 100644 --- a/test/boost_no_typeid.ipp +++ b/test/boost_no_typeid.ipp @@ -16,7 +16,7 @@ namespace boost_no_typeid int test() { - typeid(int); + (void)typeid(int); return 0; } diff --git a/test/boost_no_typename_with_ctor.ipp b/test/boost_no_typename_with_ctor.ipp index 68a5a0ec..6cf4da84 100644 --- a/test/boost_no_typename_with_ctor.ipp +++ b/test/boost_no_typename_with_ctor.ipp @@ -26,6 +26,7 @@ typename T::type f() { int test() { A a = f >(); + (void)a; return 0; } diff --git a/test/boost_no_unicode_literals.ipp b/test/boost_no_unicode_literals.ipp index 1675d205..d5ffa0cb 100644 --- a/test/boost_no_unicode_literals.ipp +++ b/test/boost_no_unicode_literals.ipp @@ -12,7 +12,8 @@ namespace boost_no_cxx11_unicode_literals { -void quiet_warning(const char*){} +template +void quiet_warning(const CharT*){} int test() { @@ -20,6 +21,8 @@ int test() const char16_t* c16 = u""; const char32_t* c32 = U""; quiet_warning(c8); + quiet_warning(c16); + quiet_warning(c32); return 0; } diff --git a/test/boost_no_unified_init.ipp b/test/boost_no_unified_init.ipp index 2a09c5f3..a28a223a 100644 --- a/test/boost_no_unified_init.ipp +++ b/test/boost_no_unified_init.ipp @@ -13,13 +13,13 @@ namespace boost_no_cxx11_unified_initialization_syntax { -struct BasicStruct +struct BasicStruct { int x; double y; }; - -struct AltStruct + +struct AltStruct { public: AltStruct(int x, double y) : x_{x}, y_{y} {} @@ -27,8 +27,8 @@ private: int x_; double y_; }; - -struct IdString + +struct IdString { std::string name; int identifier; @@ -37,7 +37,7 @@ struct IdString return identifier == other.identifier && name == other.name; } }; - + IdString get_string() { return {"SomeName", 4}; //Note the lack of explicit type. @@ -47,6 +47,8 @@ int test() { BasicStruct var1{5, 3.2}; AltStruct var2{2, 4.3}; + (void) var1; + (void) var2; IdString id{"SomeName", 4}; return id == get_string() ? 0 : 1; diff --git a/test/boost_no_using_breaks_adl.ipp b/test/boost_no_using_breaks_adl.ipp index 437d9fdc..e44e285d 100644 --- a/test/boost_no_using_breaks_adl.ipp +++ b/test/boost_no_using_breaks_adl.ipp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. @@ -40,7 +40,7 @@ namespace user_ns { return 0; } template - int f(T x) + int f(T x) { // use this as a workaround: //using namespace boost; @@ -60,6 +60,7 @@ int test() typedef void* pv; i = user_ns::f(pv()); i = user_ns::f(boost_ns::inner2::X()); + (void)i; return 0; }