Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2007-08-15 10:35:40


Author: danieljames
Date: 2007-08-15 10:35:39 EDT (Wed, 15 Aug 2007)
New Revision: 38679
URL: http://svn.boost.org/trac/boost/changeset/38679

Log:
Avoid a comparison with zero warning on gcc when compiling with -Wextra.
Text files modified:
   trunk/boost/functional/detail/hash_float.hpp | 2 +-
   trunk/libs/functional/hash/test/Jamfile.v2 | 2 +-
   2 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/boost/functional/detail/hash_float.hpp
==============================================================================
--- trunk/boost/functional/detail/hash_float.hpp (original)
+++ trunk/boost/functional/detail/hash_float.hpp 2007-08-15 10:35:39 EDT (Wed, 15 Aug 2007)
@@ -106,7 +106,7 @@
                         boost::static_log2<limits<T>::radix>::value - 1)
                 / limits<std::size_t>::digits;
 
- for(std::size_t i = 0; i < length; ++i)
+ for(std::size_t i = 0; i != length; ++i)
             {
                 v = boost::hash_detail::call_ldexp(v, limits<std::size_t>::digits);
                 std::size_t part = static_cast<std::size_t>(v);

Modified: trunk/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- trunk/libs/functional/hash/test/Jamfile.v2 (original)
+++ trunk/libs/functional/hash/test/Jamfile.v2 2007-08-15 10:35:39 EDT (Wed, 15 Aug 2007)
@@ -8,7 +8,7 @@
 project hash-tests
     : requirements
         <toolset>gcc:<define>_GLIBCXX_DEBUG
- <toolset>gcc:<cxxflags>-Wsign-promo
+ "<toolset>gcc:<cxxflags>-Wsign-promo -Wextra"
         <toolset>msvc:<cxxflags>/W4
     ;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk