Opened 14 years ago

Closed 13 years ago

#2646 closed Bugs (fixed)

Warnings from unit test

Reported by: Paul A. Bristow Owned by: Gennadiy Rozental
Milestone: Boost 1.38.0 Component: test
Version: Boost 1.37.0 Severity: Cosmetic
Keywords: Cc:

Description

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++.

Attachments (1)

test warnings.txt (6.4 KB ) - added by Paul A. Bristow 14 years ago.

Download all attachments as: .zip

Change History (2)

by Paul A. Bristow, 14 years ago

Attachment: test warnings.txt added

comment:1 by Gennadiy Rozental, 13 years ago

Resolution: fixed
Status: newclosed

(In [57853]) Warnings cleanup.Fixes #2646. Fixes #3598.

Note: See TracTickets for help on using tickets.