Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68867 - sandbox/guild/pool/libs/pool/test
From: john_at_[hidden]
Date: 2011-02-14 13:04:22


Author: johnmaddock
Date: 2011-02-14 13:04:20 EST (Mon, 14 Feb 2011)
New Revision: 68867
URL: http://svn.boost.org/trac/boost/changeset/68867

Log:
Enable highest warning levels in compiles, and fix resulting errors.
Text files modified:
   sandbox/guild/pool/libs/pool/test/Jamfile.v2 | 10 ++++++++++
   sandbox/guild/pool/libs/pool/test/test_bug_3349.cpp | 1 +
   sandbox/guild/pool/libs/pool/test/test_gcd_lcm.cpp | 4 ++++
   sandbox/guild/pool/libs/pool/test/test_simple_seg_storage.cpp | 4 ++++
   4 files changed, 19 insertions(+), 0 deletions(-)

Modified: sandbox/guild/pool/libs/pool/test/Jamfile.v2
==============================================================================
--- sandbox/guild/pool/libs/pool/test/Jamfile.v2 (original)
+++ sandbox/guild/pool/libs/pool/test/Jamfile.v2 2011-02-14 13:04:20 EST (Mon, 14 Feb 2011)
@@ -8,6 +8,13 @@
         <library>/boost/test//boost_test_exec_monitor/<link>static
         <include>../../..
         <define>BOOST_ALL_NO_LIB=1
+ <warnings>all
+ <toolset>gcc:<cxxflags>-Wextra
+ <toolset>gcc:<warnings-as-errors>on
+ <toolset>gcc:<cxxflags>-Wno-long-long
+ <toolset>gcc:<cxxflags>-Wcast-align
+ <toolset>intel:<warnings-as-errors>on
+ <toolset>msvc:<warnings-as-errors>on
     ;
 
 import testing ;
@@ -19,4 +26,7 @@
     [ run pool_msvc_compiler_bug_test.cpp ]
     [ run test_msvc_mem_leak_detect.cpp ]
     [ run test_bug_3349.cpp ]
+ [ run test_bug_3441.cpp ]
     ;
+
+

Modified: sandbox/guild/pool/libs/pool/test/test_bug_3349.cpp
==============================================================================
--- sandbox/guild/pool/libs/pool/test/test_bug_3349.cpp (original)
+++ sandbox/guild/pool/libs/pool/test/test_bug_3349.cpp 2011-02-14 13:04:20 EST (Mon, 14 Feb 2011)
@@ -18,6 +18,7 @@
 
     void* pBlock1 = p.ordered_malloc( 1 );
     void* pBlock2 = p.ordered_malloc( 4 );
+ (void)pBlock2; // warning suppression
 
     p.ordered_free( pBlock1 );
 

Modified: sandbox/guild/pool/libs/pool/test/test_gcd_lcm.cpp
==============================================================================
--- sandbox/guild/pool/libs/pool/test/test_gcd_lcm.cpp (original)
+++ sandbox/guild/pool/libs/pool/test/test_gcd_lcm.cpp 2011-02-14 13:04:20 EST (Mon, 14 Feb 2011)
@@ -19,6 +19,10 @@
 #include <climits>
 #include <ctime>
 
+#ifdef BOOST_MSVC
+#pragma warning(disable:4127) // Conditional expression is constant
+#endif
+
 boost::mt19937 gen;
 
 int main()

Modified: sandbox/guild/pool/libs/pool/test/test_simple_seg_storage.cpp
==============================================================================
--- sandbox/guild/pool/libs/pool/test/test_simple_seg_storage.cpp (original)
+++ sandbox/guild/pool/libs/pool/test/test_simple_seg_storage.cpp 2011-02-14 13:04:20 EST (Mon, 14 Feb 2011)
@@ -26,6 +26,10 @@
 #include <cstdlib>
 #include <ctime>
 
+#ifdef BOOST_MSVC
+#pragma warning(disable:4267)
+#endif
+
 // "A free list is ordered if repeated calls to malloc() will result in a
 // constantly-increasing sequence of values, as determined by std::less<void*>"
 // Return: true if in constantly-increasing order, false otherwise


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