|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81830 - trunk/libs/config/test
From: john_at_[hidden]
Date: 2012-12-10 13:39:14
Author: johnmaddock
Date: 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
New Revision: 81830
URL: http://svn.boost.org/trac/boost/changeset/81830
Log:
Suppress a lot of GCC warnings.
Text files modified:
trunk/libs/config/test/Jamfile.v2 | 18 ++++++++++++------
trunk/libs/config/test/boost_has_hash.ipp | 9 +++++----
trunk/libs/config/test/boost_has_nrvo.ipp | 8 ++++----
trunk/libs/config/test/boost_no_auto_declarations.ipp | 2 +-
trunk/libs/config/test/boost_no_auto_multidecl.ipp | 2 +-
trunk/libs/config/test/boost_no_char16_t.ipp | 4 ++--
trunk/libs/config/test/boost_no_char32_t.ipp | 4 ++--
trunk/libs/config/test/boost_no_cxx11_allocator.ipp | 4 ++++
trunk/libs/config/test/boost_no_cxx11_hdr_array.ipp | 2 +-
trunk/libs/config/test/boost_no_cxx11_hdr_initializer_list.ipp | 2 +-
trunk/libs/config/test/boost_no_cxx11_smart_ptr.ipp | 3 +++
trunk/libs/config/test/boost_no_decltype.ipp | 8 ++++----
trunk/libs/config/test/boost_no_is_abstract.ipp | 8 ++++----
trunk/libs/config/test/boost_no_std_wstreambuf.ipp | 10 +++++-----
trunk/libs/config/test/boost_no_stdc_namespace.ipp | 14 +++++++-------
trunk/libs/config/test/boost_no_tem_local_classes.ipp | 2 +-
trunk/libs/config/test/boost_no_template_streams.ipp | 7 ++++---
trunk/libs/config/test/boost_no_typeid.ipp | 2 +-
trunk/libs/config/test/boost_no_typename_with_ctor.ipp | 1 +
trunk/libs/config/test/boost_no_unicode_literals.ipp | 5 ++++-
trunk/libs/config/test/boost_no_unified_init.ipp | 14 ++++++++------
trunk/libs/config/test/boost_no_using_breaks_adl.ipp | 9 +++++----
22 files changed, 80 insertions(+), 58 deletions(-)
Modified: trunk/libs/config/test/Jamfile.v2
==============================================================================
--- trunk/libs/config/test/Jamfile.v2 (original)
+++ trunk/libs/config/test/Jamfile.v2 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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
+ <toolset>gcc:<cxxflags>-Wno-deprecated-declarations
+;
+
+
import modules ;
local is_unix = [ modules.peek : UNIX ] ;
@@ -24,20 +30,20 @@
}
test-suite config
- :
+ :
[ compile config_test_c.c ]
- [ run config_test.cpp
+ [ run config_test.cpp
: #args
: #input-files
: #requirements
<threading>multi
: config_test_threaded
]
- [ run config_test.cpp
+ [ run config_test.cpp
: #args
: #input-files
: #requirements
- <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static
+ <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static
<target-os>linux:<linkflags>-lpthread
<target-os>linux:<linkflags>-lrt
<toolset>gcc:<linkflags>$(OTHERFLAGS)
Modified: trunk/libs/config/test/boost_has_hash.ipp
==============================================================================
--- trunk/libs/config/test/boost_has_hash.ipp (original)
+++ trunk/libs/config/test/boost_has_hash.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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 <ext/hash_set>
# include <ext/hash_map>
# 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 <ext/*> 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.
Modified: trunk/libs/config/test/boost_has_nrvo.ipp
==============================================================================
--- trunk/libs/config/test/boost_has_nrvo.ipp (original)
+++ trunk/libs/config/test/boost_has_nrvo.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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 @@
{
public:
test_class() {}
- test_class(const test_class &other)
+ test_class(const test_class&)
{
++copy_count;
}
Modified: trunk/libs/config/test/boost_no_auto_declarations.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_auto_declarations.ipp (original)
+++ trunk/libs/config/test/boost_no_auto_declarations.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -11,7 +11,7 @@
namespace boost_no_cxx11_auto_declarations {
-void check_f(int& x)
+void check_f(int&)
{
}
Modified: trunk/libs/config/test/boost_no_auto_multidecl.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_auto_multidecl.ipp (original)
+++ trunk/libs/config/test/boost_no_auto_multidecl.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -11,7 +11,7 @@
namespace boost_no_cxx11_auto_multideclarations {
-void check_f(int& x, int*& y)
+void check_f(int&, int*&)
{
}
Modified: trunk/libs/config/test/boost_no_char16_t.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_char16_t.ipp (original)
+++ trunk/libs/config/test/boost_no_char16_t.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -24,8 +24,8 @@
int test()
{
- const char16_t* p;
- f(p);
+ const char16_t p(0);
+ f(&p);
return 0;
}
Modified: trunk/libs/config/test/boost_no_char32_t.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_char32_t.ipp (original)
+++ trunk/libs/config/test/boost_no_char32_t.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -23,8 +23,8 @@
int test()
{
- const char32_t* p;
- f(p);
+ const char32_t p(0);
+ f(&p);
return 0;
}
Modified: trunk/libs/config/test/boost_no_cxx11_allocator.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_cxx11_allocator.ipp (original)
+++ trunk/libs/config/test/boost_no_cxx11_allocator.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -17,6 +17,7 @@
int test()
{
std::pointer_traits<char*>* p = 0;
+ (void) p;
//std::pointer_safety s = std::relaxed;
//char* (*l_undeclare_reachable)(char *p) = std::undeclare_reachable;
@@ -28,6 +29,9 @@
std::uses_allocator<int, std::allocator<int> > ua;
std::allocator_traits<std::allocator<int> > at;
+ (void)aat;
+ (void)ua;
+ (void)at;
return 0;
}
Modified: trunk/libs/config/test/boost_no_cxx11_hdr_array.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_cxx11_hdr_array.ipp (original)
+++ trunk/libs/config/test/boost_no_cxx11_hdr_array.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -16,7 +16,7 @@
int test()
{
- std::array<int, 3> a = { 1, 2, 3 };
+ std::array<int, 3> a = {{ 1, 2, 3 }};
return a.size() == 3 ? 0 : 1;
}
Modified: trunk/libs/config/test/boost_no_cxx11_hdr_initializer_list.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_cxx11_hdr_initializer_list.ipp (original)
+++ trunk/libs/config/test/boost_no_cxx11_hdr_initializer_list.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -14,7 +14,7 @@
namespace boost_no_cxx11_hdr_initializer_list {
-void foo(const std::initializer_list<const char*>& l)
+void foo(const std::initializer_list<const char*>&)
{
}
Modified: trunk/libs/config/test/boost_no_cxx11_smart_ptr.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_cxx11_smart_ptr.ipp (original)
+++ trunk/libs/config/test/boost_no_cxx11_smart_ptr.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -26,6 +26,9 @@
std::hash<std::shared_ptr<int> > h1;
std::hash<std::unique_ptr<int> > h2;
+ (void)h1;
+ (void)h2;
+
return 0;
}
Modified: trunk/libs/config/test/boost_no_decltype.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_decltype.ipp (original)
+++ trunk/libs/config/test/boost_no_decltype.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -40,11 +40,11 @@
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
Modified: trunk/libs/config/test/boost_no_is_abstract.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_is_abstract.ipp (original)
+++ trunk/libs/config/test/boost_no_is_abstract.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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 @@
int test()
{
- return is_abstract_test<non_abstract>::value == is_abstract_test<abstract>::value;
+ return static_cast<bool>(is_abstract_test<non_abstract>::value) == static_cast<bool>(is_abstract_test<abstract>::value);
}
}
Modified: trunk/libs/config/test/boost_no_std_wstreambuf.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_std_wstreambuf.ipp (original)
+++ trunk/libs/config/test/boost_no_std_wstreambuf.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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 @@
private:
parser_buf& operator=(const parser_buf&)
{ return *this; };
- parser_buf(const parser_buf&){};
+ parser_buf(const parser_buf&);
};
template<class charT, class traits>
@@ -56,7 +56,7 @@
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))
Modified: trunk/libs/config/test/boost_no_stdc_namespace.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_stdc_namespace.ipp (original)
+++ trunk/libs/config/test/boost_no_stdc_namespace.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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 @@
{
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;
}
Modified: trunk/libs/config/test/boost_no_tem_local_classes.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_tem_local_classes.ipp (original)
+++ trunk/libs/config/test/boost_no_tem_local_classes.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -19,7 +19,7 @@
namespace boost_no_cxx11_local_class_template_parameters {
template<typename T> struct a { void use() {} };
-template<typename T> void f(T x) {}
+template<typename T> void f(T) {}
int test() {
class local_class {} local_obj;
Modified: trunk/libs/config/test/boost_no_template_streams.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_template_streams.ipp (original)
+++ trunk/libs/config/test/boost_no_template_streams.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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 @@
int test()
{
std::basic_ostream<char, std::char_traits<char> >& osr = std::cout;
+ (void)osr;
return 0;
}
Modified: trunk/libs/config/test/boost_no_typeid.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_typeid.ipp (original)
+++ trunk/libs/config/test/boost_no_typeid.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -16,7 +16,7 @@
int test()
{
- typeid(int);
+ (void)typeid(int);
return 0;
}
Modified: trunk/libs/config/test/boost_no_typename_with_ctor.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_typename_with_ctor.ipp (original)
+++ trunk/libs/config/test/boost_no_typename_with_ctor.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -26,6 +26,7 @@
int test() {
A a = f<B<A> >();
+ (void)a;
return 0;
}
Modified: trunk/libs/config/test/boost_no_unicode_literals.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_unicode_literals.ipp (original)
+++ trunk/libs/config/test/boost_no_unicode_literals.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -12,7 +12,8 @@
namespace boost_no_cxx11_unicode_literals {
-void quiet_warning(const char*){}
+template <class CharT>
+void quiet_warning(const CharT*){}
int test()
{
@@ -20,6 +21,8 @@
const char16_t* c16 = u"";
const char32_t* c32 = U"";
quiet_warning(c8);
+ quiet_warning(c16);
+ quiet_warning(c32);
return 0;
}
Modified: trunk/libs/config/test/boost_no_unified_init.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_unified_init.ipp (original)
+++ trunk/libs/config/test/boost_no_unified_init.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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 @@
int x_;
double y_;
};
-
-struct IdString
+
+struct IdString
{
std::string name;
int identifier;
@@ -37,7 +37,7 @@
return identifier == other.identifier && name == other.name;
}
};
-
+
IdString get_string()
{
return {"SomeName", 4}; //Note the lack of explicit type.
@@ -47,6 +47,8 @@
{
BasicStruct var1{5, 3.2};
AltStruct var2{2, 4.3};
+ (void) var1;
+ (void) var2;
IdString id{"SomeName", 4};
return id == get_string() ? 0 : 1;
Modified: trunk/libs/config/test/boost_no_using_breaks_adl.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_using_breaks_adl.ipp (original)
+++ trunk/libs/config/test/boost_no_using_breaks_adl.ipp 2012-12-10 13:39:11 EST (Mon, 10 Dec 2012)
@@ -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 @@
{ return 0; }
template <class T>
- int f(T x)
+ int f(T x)
{
// use this as a workaround:
//using namespace boost;
@@ -60,6 +60,7 @@
typedef void* pv;
i = user_ns::f(pv());
i = user_ns::f(boost_ns::inner2::X<int>());
+ (void)i;
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk