[test] spurious clang complier warnings

When I compile my test code with clang on Macintosh (now Apple's default compiler), I get the two compiler warnings listed below. Could these be suppressed, please? I know this is a low priority item, but I expect it's pretty easy to fix.
-Ian Emmons
==============================
In file included from MyTest.cpp:6:
In file included from ./MyTest.h:7:
In file included from /Users/iemmons/dev/boost_1_53_0/boost/test/unit_test.hpp:19:
In file included from /Users/iemmons/dev/boost_1_53_0/boost/test/test_tools.hpp:21:
/Users/iemmons/dev/boost_1_53_0/boost/test/floating_point_comparison.hpp:251:25: warning: unused variable 'check_is_close' [-Wunused-variable]
check_is_close_t const& check_is_close = unit_test::ut_detail::static_constant

When I compile my test code with clang on Macintosh (now Apple's default compiler), I get the two compiler warnings listed below. ... .../floating_point_comparison.hpp:251:25: warning: unused variable 'check_is_close' [-Wunused-variable] .../floating_point_comparison.hpp:273:25: warning: unused variable 'check_is_small' [-Wunused-variable]
That happens to be https://svn.boost.org/trac/boost/ticket/5986. - Rhys

I've actually noticed this in a number of libraries. Clang also warns for
unused global variables, so for some of the boost libraries there are
literally thousands of warnings generated. It is rather painful.
Cheers!
Andrew Hundt
On Fri, Mar 8, 2013 at 1:40 PM, Rhys Ulerich
When I compile my test code with clang on Macintosh (now Apple's default compiler), I get the two compiler warnings listed below. ... .../floating_point_comparison.hpp:251:25: warning: unused variable 'check_is_close' [-Wunused-variable] .../floating_point_comparison.hpp:273:25: warning: unused variable 'check_is_small' [-Wunused-variable]
That happens to be https://svn.boost.org/trac/boost/ticket/5986.
- Rhys
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 3/8/2013 10:49 AM, Andrew Hundt wrote:
I've actually noticed this in a number of libraries. Clang also warns for unused global variables, so for some of the boost libraries there are literally thousands of warnings generated. It is rather painful.
You should file a separate bug for each library that generates these warnings. I've just fixed a bunch for boost.accumulators. -- Eric Niebler Boost.org http://www.boost.org
participants (4)
-
Andrew Hundt
-
Eric Niebler
-
Ian Emmons
-
Rhys Ulerich