[Boost-bugs] [Boost C++ Libraries] #5986: clang warning: unused variable check_is_small

Subject: [Boost-bugs] [Boost C++ Libraries] #5986: clang warning: unused variable check_is_small
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-10-06 23:59:45


#5986: clang warning: unused variable check_is_small
-------------------------------------+--------------------------------------
 Reporter: mloskot | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost Development Trunk | Severity: Problem
 Keywords: clang |
-------------------------------------+--------------------------------------
 Current clang issues warning in floating_point_comparison.hpp:

 {{{
 warning: unused variable 'check_is_close
 warning: unused variable 'check_is_small
 }}}

 There seems to be similar report for GCC in #2390


 The only way to deal with it in clang is to wrap the Boost.Test headers
 with

 {{{
 #ifdef __clang__
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wunused-variable"
 #endif

 #include <boost/test/...>

 #ifdef __clang__
 #pragma clang diagnostic pop
 #endif
 }}}

 Perhaps it is possible to solve it in the library, so users don't have to
 deal with it.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5986>
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:50:07 UTC