Opened 13 years ago

Closed 13 years ago

#3646 closed Patches (duplicate)

Boost.test build of libraries - warnings ttat could be silenced.

Reported by: Paul A. Bristow Owned by: Gennadiy Rozental
Milestone: Boost 1.42.0 Component: test
Version: Boost 1.41.0 Severity: Cosmetic
Keywords: test warnings Cc:

Description

A few more warnings in Boost.Test could be silenced - to get to the zero warnings nirvana state ;-)

I am also a bit concerned about:

wd4671 # the copy constructor is inaccessible.

wd4673 # A throw object cannot be handled in the catch block.

which look a bit as though they really ought to be fixed?

(or why not documented 'why not' a bit more fully?)

But a jamfile including this produced a clear build for me starting with 1.41.0

project boost/test    : source-location ../src
    : requirements <link>shared:<define>BOOST_TEST_DYN_LINK=1
                   <toolset>msvc:<asynch-exceptions>on # /Eha synch-exceptions are needed for Boost.Test.
                   <toolset>borland:<cxxflags>-w-8080
                   # Disable Warning about boost::noncopyable not being exported.
                   <link>shared,<toolset>msvc:<cxxflags>-wd4275 # inline assembly instruction that may not produce accurate results on some Pentium microprocessors.
                   <toolset>msvc:<cxxflags>-wd4671 # the copy constructor is inaccessible.
                   <toolset>msvc:<cxxflags>-wd4673 # A throw object cannot be handled in the catch block.
                   <toolset>msvc:<cxxflags>-wd4996 # Suppress warning 'putenv': POSIX name for this item is deprecated.
                   <toolset>msvc:<cxxflags>-wd4701 # Potentially uninitialised variable used.
                   <toolset>msvc:<cxxflags>-wd4701 # Unreachable code.
                   <toolset>msvc:<asynch-exceptions>on # /Eha synch-exceptions are needed for Boost.Test.
                   <warnings>all
    : usage-requirements
                   <define>BOOST_TEST_NO_AUTO_LINK=1
                   # Disable Warning about boost::noncopyable not being exported.
                   <link>shared,<toolset>msvc:<cxxflags>-wd4275 # inline assembly instruction that may not produce accurate results on some Pentium microprocessors.
    ;


Change History (3)

comment:1 by Steven Watanabe, 13 years ago

These should probably be disabled in the source, since Boost.Test can be used with direct #include instead of a library.

comment:2 by John Maddock, 13 years ago

Isn't this a duplicate of https://svn.boost.org/trac/boost/ticket/3598 - which provides patches to fix the issues in source?

John.

PS If everyone could check the status of https://svn.boost.org/trac/boost/wiki/WarningFixes before working up fixes it would save duplicating effort ;-)

comment:3 by Gennadiy Rozental, 13 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.