[Boost-bugs] [Boost C++ Libraries] #2646: Warnings from unit test

Subject: [Boost-bugs] [Boost C++ Libraries] #2646: Warnings from unit test
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-01-09 12:44:27


#2646: Warnings from unit test
--------------------------+-------------------------------------------------
 Reporter: pbristow | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: test
  Version: Boost 1.37.0 | Severity: Cosmetic
 Keywords: |
--------------------------+-------------------------------------------------
 Sorry but I am still seeing lots of confusing warnings from unit test
 (trunk 50524) MSVC 2008 warning level 3 & 4, debug. (See attached file).

 I have added these to my test file to get a clean compile:

 #ifdef _MSC_VER
 # pragma warning(disable: 4800) // int' : forcing value to bool 'true' or
 'false'
 # pragma warning(disable: 4310) // cast truncates constant value in
 unit_test_main
 # pragma warning(disable: 4996) // 'putenv': The POSIX name for this item
 is deprecated.
 # pragma warning(disable: 4224) // nonstandard extension used : formal
 parameter 'arg' was previously defined as a type
 #endif

 and this quiets them for my simple test

 #define BOOST_TEST_MODULE Scale_axis_Tests
 #include <boost/test/included/unit_test.hpp>
 #include <boost/test/floating_point_comparison.hpp>

 BOOST_AUTO_TEST_CASE(rounds_test)
   BOOST_CHECK_CLOSE(roundup10(0.99), 1., tol);
 ...

 (Adding these to supress_warnings.hpp has no effect).

 One complaint is that
     putenv( const_cast<char*>( fs.str().c_str() ) );

 calls POSIX name and not the ISO C++.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2646>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC