From 91aa2ce64d07fd0fe983033ebe58a24c2bae3bbf Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 12 Jul 2013 11:33:15 +0000 Subject: [PATCH] Report more warnings while testing boost::lexical_cast. Some warnings suppressed [SVN r85007] --- test/Jamfile.v2 | 7 ++++++- test/implicit_cast_fail.cpp | 4 +++- test/lexical_cast_to_pointer_test.cpp | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 25980bb..c66fae7 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -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 @@ project gcc-4.7:-ftrapv gcc-4.6:-ftrapv clang:-ftrapv + # default to all warnings on: + all + # set warnings as errors for those compilers we know we get warning free: + gcc:-Wextra + gcc:-Wno-uninitialized ; # Thanks to Steven Watanabe for helping with feature diff --git a/test/implicit_cast_fail.cpp b/test/implicit_cast_fail.cpp index a7867a1..2bc7068 100644 --- a/test/implicit_cast_fail.cpp +++ b/test/implicit_cast_fail.cpp @@ -19,6 +19,8 @@ struct foo int test_main(int, char*[]) { foo x = implicit_cast("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; } + diff --git a/test/lexical_cast_to_pointer_test.cpp b/test/lexical_cast_to_pointer_test.cpp index 6756146..e008fb1 100644 --- a/test/lexical_cast_to_pointer_test.cpp +++ b/test/lexical_cast_to_pointer_test.cpp @@ -17,5 +17,7 @@ int test_main(int, char*[]) { boost::lexical_cast("Hello"); + BOOST_CHECK(false); // suppressing warning about ‘boost::unit_test::{anonymous}::unit_test_log’ defined but not used return 0; } +