From 08d38c1e39cbeaaf30004c53a7460c397b75d7a3 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 15 Aug 2007 14:35:39 +0000 Subject: [PATCH] Avoid a comparison with zero warning on gcc when compiling with -Wextra. [SVN r38679] --- hash/test/Jamfile.v2 | 2 +- include/boost/functional/detail/hash_float.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hash/test/Jamfile.v2 b/hash/test/Jamfile.v2 index 8d0649b..2131e7b 100644 --- a/hash/test/Jamfile.v2 +++ b/hash/test/Jamfile.v2 @@ -8,7 +8,7 @@ import testing ; project hash-tests : requirements gcc:_GLIBCXX_DEBUG - gcc:-Wsign-promo + "gcc:-Wsign-promo -Wextra" msvc:/W4 ; diff --git a/include/boost/functional/detail/hash_float.hpp b/include/boost/functional/detail/hash_float.hpp index 7487ea0..8735e8b 100644 --- a/include/boost/functional/detail/hash_float.hpp +++ b/include/boost/functional/detail/hash_float.hpp @@ -106,7 +106,7 @@ namespace boost boost::static_log2::radix>::value - 1) / limits::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::digits); std::size_t part = static_cast(v);