Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75185 - trunk/libs/config/test
From: bdawes_at_[hidden]
Date: 2011-10-31 07:21:14


Author: bemandawes
Date: 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
New Revision: 75185
URL: http://svn.boost.org/trac/boost/changeset/75185

Log:
Clear compiler warnings
Text files modified:
   trunk/libs/config/test/boost_has_ftime.ipp | 3 +--
   trunk/libs/config/test/boost_no_char16_t.ipp | 3 +++
   trunk/libs/config/test/boost_no_char32_t.ipp | 3 +++
   trunk/libs/config/test/boost_no_constexpr.ipp | 3 +++
   trunk/libs/config/test/boost_no_decltype.ipp | 3 +++
   trunk/libs/config/test/boost_no_defaulted_functions.ipp | 2 +-
   trunk/libs/config/test/boost_no_deleted_functions.ipp | 2 +-
   trunk/libs/config/test/boost_no_explicit_cvt_ops.ipp | 5 ++++-
   trunk/libs/config/test/boost_no_initializer_lists.ipp | 3 +++
   trunk/libs/config/test/boost_no_lambdas.ipp | 2 +-
   trunk/libs/config/test/boost_no_noexcept.ipp | 3 +++
   trunk/libs/config/test/boost_no_nullptr.ipp | 3 +++
   trunk/libs/config/test/boost_no_raw_literals.ipp | 5 +++++
   trunk/libs/config/test/boost_no_std_typeinfo.ipp | 2 ++
   trunk/libs/config/test/boost_no_unicode_literals.ipp | 2 ++
   trunk/libs/config/test/boost_no_variadic_macros.ipp | 4 +++-
   16 files changed, 41 insertions(+), 7 deletions(-)

Modified: trunk/libs/config/test/boost_has_ftime.ipp
==============================================================================
--- trunk/libs/config/test/boost_has_ftime.ipp (original)
+++ trunk/libs/config/test/boost_has_ftime.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -14,10 +14,9 @@
 
 namespace boost_has_ftime{
 
-void f()
+void f(FILETIME)
 {
     // this is never called, it just has to compile:
- FILETIME ft;
 }
 
 int test()

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 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -13,9 +13,12 @@
 
 namespace boost_no_char16_t {
 
+void quiet_warning(const char16_t*){}
+
 int test()
 {
   const char16_t* p = u"abc";
+ quiet_warning(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 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -12,9 +12,12 @@
 
 namespace boost_no_char32_t {
 
+void quiet_warning(const char32_t*){}
+
 int test()
 {
   const char32_t* p = U"abc";
+ quiet_warning(p);
   return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_constexpr.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_constexpr.ipp (original)
+++ trunk/libs/config/test/boost_no_constexpr.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -12,6 +12,8 @@
 
 namespace boost_no_constexpr {
 
+void quiet_warning(int){}
+
 constexpr int square(int x) { return x * x; } // from N2235
 
 // from 5.19:
@@ -37,6 +39,7 @@
 int test()
 {
   int i = square(5);
+ quiet_warning(i);
   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 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -13,6 +13,8 @@
 
 namespace boost_no_decltype {
 
+void quiet_warning(int){}
+
 struct test_class
 {
    test_class() {}
@@ -39,6 +41,7 @@
 {
   int i;
   decltype(i) j;
+// quiet_warning(j);
   decltype(get_test_class()) k;
   #ifndef _MSC_VER
   // Although the VC++ decltype is buggy, we none the less enable support,

Modified: trunk/libs/config/test/boost_no_defaulted_functions.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_defaulted_functions.ipp (original)
+++ trunk/libs/config/test/boost_no_defaulted_functions.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -11,7 +11,7 @@
 // DESCRIPTION: The compiler does not support C++0x defaulted functions
 
 #if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(BOOST_INTEL_STDCXX0X)
-# error Defaulted functions aren't really supported in non-C++0x mode
+# error Defaulted functions are not supported in non-C++0x mode
 #endif
 
 namespace boost_no_defaulted_functions {

Modified: trunk/libs/config/test/boost_no_deleted_functions.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_deleted_functions.ipp (original)
+++ trunk/libs/config/test/boost_no_deleted_functions.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -11,7 +11,7 @@
 // DESCRIPTION: The compiler does not support C++0x =delete functions
 
 #if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(BOOST_INTEL_STDCXX0X)
-# error Deleted functions aren't really supported in non-C++0x mode
+# error Deleted functions are not supported in non-C++0x mode
 #endif
 
 namespace boost_no_deleted_functions {

Modified: trunk/libs/config/test/boost_no_explicit_cvt_ops.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_explicit_cvt_ops.ipp (original)
+++ trunk/libs/config/test/boost_no_explicit_cvt_ops.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -11,11 +11,13 @@
 // DESCRIPTION: The compiler does not support C++0x explicit conversion operators
 
 #if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(BOOST_INTEL_STDCXX0X)
-# error This feature isn't really available in non-C++0x mode
+# error This feature is not available in non-C++0x mode
 #endif
 
 namespace boost_no_explicit_conversion_operators {
 
+void quiet_warning(int){}
+
   struct foo {
     explicit operator int() { return 1; }
   };
@@ -24,6 +26,7 @@
 {
   foo f;
   int i = int(f);
+ quiet_warning(i);
   return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_initializer_lists.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_initializer_lists.ipp (original)
+++ trunk/libs/config/test/boost_no_initializer_lists.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -16,6 +16,8 @@
 
 namespace boost_no_initializer_lists {
 
+void quiet_warning(const std::initializer_list<int>&){}
+
 void f(std::initializer_list<int>)
 {
 }
@@ -25,6 +27,7 @@
     std::vector<std::string> v{"once", "upon", "a", "time"}; // See C++ std 8.5.4
     f( { 1, 2, 3, 4 } );
     std::initializer_list<int> x = { 1, 2 };
+ quiet_warning(x);
     return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_lambdas.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_lambdas.ipp (original)
+++ trunk/libs/config/test/boost_no_lambdas.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -11,7 +11,7 @@
 // DESCRIPTION: The compiler does not support the C++0x lambda feature
 
 #if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(BOOST_INTEL_STDCXX0X)
-# error This feature isn't really available in non-C++0x mode
+# error This feature is not available in non-C++0x mode
 #endif
 
 namespace boost_no_lambdas {

Modified: trunk/libs/config/test/boost_no_noexcept.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_noexcept.ipp (original)
+++ trunk/libs/config/test/boost_no_noexcept.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -11,12 +11,15 @@
 
 namespace boost_no_noexcept {
 
+void quiet_warning(bool){}
+
 int f() noexcept ;
 int g() noexcept( noexcept( f() ) ) ;
 
 int test()
 {
   bool b = noexcept( g() );
+ quiet_warning(b);
   return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_nullptr.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_nullptr.ipp (original)
+++ trunk/libs/config/test/boost_no_nullptr.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -12,9 +12,12 @@
 
 namespace boost_no_nullptr {
 
+void quiet_warning(const int*){}
+
 int test()
 {
   int * p = nullptr;
+ quiet_warning(p);
   return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_raw_literals.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_raw_literals.ipp (original)
+++ trunk/libs/config/test/boost_no_raw_literals.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -12,10 +12,15 @@
 
 namespace boost_no_raw_literals {
 
+void quiet_warning(const char*){}
+void quiet_warning(const wchar_t*){}
+
 int test()
 {
   const char* s = R"(abc)";
+ quiet_warning(s);
   const wchar_t* ws = LR"(abc)";
+ quiet_warning(ws);
   return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_std_typeinfo.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_std_typeinfo.ipp (original)
+++ trunk/libs/config/test/boost_no_std_typeinfo.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -13,10 +13,12 @@
 
 namespace boost_no_std_typeinfo
 {
+void quiet_warning(const std::type_info*){}
 
 int test()
 {
    std::type_info * p = 0;
+ quiet_warning(p);
    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 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -12,10 +12,12 @@
 
 namespace boost_no_unicode_literals {
 
+void quiet_warning(const char*){}
 
 int test()
 {
   const char* c8 = u8"";
+ quiet_warning(c8);
   return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_variadic_macros.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_variadic_macros.ipp (original)
+++ trunk/libs/config/test/boost_no_variadic_macros.ipp 2011-10-31 07:21:10 EDT (Mon, 31 Oct 2011)
@@ -49,13 +49,15 @@
 
 namespace boost_no_variadic_macros {
 
+void quiet_warning(int){}
+
 template<TEST_VARIADIC_MACRO_STRIP_PARENS((typename T,int))> struct test_variadic_macro_class {};
 
 int test()
 {
 
   int x = TEST_VARIADIC_MACRO_STRIP_PARENS(3);
-
+ quiet_warning(x);
   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