Boost C++ Libraries: Ticket #2646: Warnings from unit test https://svn.boost.org/trac10/ticket/2646 <p> Sorry but I am still seeing lots of confusing warnings from unit test (trunk 50524) MSVC 2008 warning level 3 &amp; 4, debug. (See attached file). </p> <p> I have added these to my test file to get a clean compile: </p> <p> #ifdef _MSC_VER # pragma warning(disable: 4800) <em> int' : forcing value to bool 'true' or 'false' # pragma warning(disable: 4310) </em> cast truncates constant value in unit_test_main # pragma warning(disable: 4996) <em> 'putenv': The POSIX name for this item is deprecated. # pragma warning(disable: 4224) </em> nonstandard extension used : formal parameter 'arg' was previously defined as a type #endif </p> <p> and this quiets them for my simple test </p> <p> #define BOOST_TEST_MODULE Scale_axis_Tests #include &lt;boost/test/included/unit_test.hpp&gt; #include &lt;boost/test/floating_point_comparison.hpp&gt; </p> <p> BOOST_AUTO_TEST_CASE(rounds_test) </p> <blockquote> <p> BOOST_CHECK_CLOSE(roundup10(0.99), 1., tol); </p> </blockquote> <p> ... </p> <p> (Adding these to supress_warnings.hpp has no effect). </p> <p> One complaint is that </p> <blockquote> <p> putenv( const_cast&lt;char*&gt;( fs.str().c_str() ) ); </p> </blockquote> <p> calls POSIX name and not the ISO C++. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2646 Trac 1.4.3 Paul A. Bristow Fri, 09 Jan 2009 12:44:52 GMT attachment set https://svn.boost.org/trac10/ticket/2646 https://svn.boost.org/trac10/ticket/2646 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test warnings.txt</span> </li> </ul> Ticket Gennadiy Rozental Mon, 23 Nov 2009 02:24:03 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2646#comment:1 https://svn.boost.org/trac10/ticket/2646#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/57853" title="Warnings cleanup.Fixes #2646. Fixes #3598.">[57853]</a>) Warnings cleanup.Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2646" title="#2646: Bugs: Warnings from unit test (closed: fixed)">#2646</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3598" title="#3598: Patches: Patch for warnings in Boost.Test (closed: fixed)">#3598</a>. </p> Ticket