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

[SVN r85007]
This commit is contained in:
Antony Polukhin
2013-07-12 11:33:15 +00:00
parent f7bd5e24c2
commit 91aa2ce64d
3 changed files with 11 additions and 2 deletions

View File

@ -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
<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

View File

@ -19,6 +19,8 @@ struct foo
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;
}

View File

@ -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;
}