Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85007 - trunk/libs/conversion/test
From: antoshkka_at_[hidden]
Date: 2013-07-12 07:33:16


Author: apolukhin
Date: 2013-07-12 07:33:15 EDT (Fri, 12 Jul 2013)
New Revision: 85007
URL: http://svn.boost.org/trac/boost/changeset/85007

Log:
Report more warnings while testing boost::lexical_cast. Some warnings suppressed

Text files modified:
   trunk/libs/conversion/test/Jamfile.v2 | 7 ++++++-
   trunk/libs/conversion/test/implicit_cast_fail.cpp | 4 +++-
   trunk/libs/conversion/test/lexical_cast_to_pointer_test.cpp | 2 ++
   3 files changed, 11 insertions(+), 2 deletions(-)

Modified: trunk/libs/conversion/test/Jamfile.v2
==============================================================================
--- trunk/libs/conversion/test/Jamfile.v2 Fri Jul 12 07:14:11 2013 (r85006)
+++ trunk/libs/conversion/test/Jamfile.v2 2013-07-12 07:33:15 EDT (Fri, 12 Jul 2013) (r85007)
@@ -1,5 +1,5 @@
 # Copyright (C) 2001-2003 Douglas Gregor
-# Copyright (C) 2011-2012 Antony Polukhin
+# Copyright (C) 2011-2013 Antony Polukhin
 #
 # Distributed under 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)
@@ -15,6 +15,11 @@
         <toolset>gcc-4.7:<cxxflags>-ftrapv
         <toolset>gcc-4.6:<cxxflags>-ftrapv
         <toolset>clang:<cxxflags>-ftrapv
+ # default to all warnings on:
+ <warnings>all
+ # set warnings as errors for those compilers we know we get warning free:
+ <toolset>gcc:<cxxflags>-Wextra
+ <toolset>gcc:<cxxflags>-Wno-uninitialized
     ;
 
 # Thanks to Steven Watanabe for helping with <nowchar> feature

Modified: trunk/libs/conversion/test/implicit_cast_fail.cpp
==============================================================================
--- trunk/libs/conversion/test/implicit_cast_fail.cpp Fri Jul 12 07:14:11 2013 (r85006)
+++ trunk/libs/conversion/test/implicit_cast_fail.cpp 2013-07-12 07:33:15 EDT (Fri, 12 Jul 2013) (r85007)
@@ -19,6 +19,8 @@
 int test_main(int, char*[])
 {
     foo x = implicit_cast<foo>("foobar");
- (void)x; // warning suppression.
+ (void)x; // warning suppression.
+ BOOST_CHECK(false); // suppressing warning about ‘boost::unit_test::{anonymous}::unit_test_log’ defined but not used
     return 0;
 }
+

Modified: trunk/libs/conversion/test/lexical_cast_to_pointer_test.cpp
==============================================================================
--- trunk/libs/conversion/test/lexical_cast_to_pointer_test.cpp Fri Jul 12 07:14:11 2013 (r85006)
+++ trunk/libs/conversion/test/lexical_cast_to_pointer_test.cpp 2013-07-12 07:33:15 EDT (Fri, 12 Jul 2013) (r85007)
@@ -17,5 +17,7 @@
 int test_main(int, char*[])
 {
     boost::lexical_cast<char*>("Hello");
+ BOOST_CHECK(false); // suppressing warning about ‘boost::unit_test::{anonymous}::unit_test_log’ defined but not used
     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