diff --git a/include/boost/intrusive/avltree_algorithms.hpp b/include/boost/intrusive/avltree_algorithms.hpp index 1a08df6..1747b87 100644 --- a/include/boost/intrusive/avltree_algorithms.hpp +++ b/include/boost/intrusive/avltree_algorithms.hpp @@ -74,7 +74,7 @@ struct avltree_node_checker const return_type& check_return_left, const return_type& check_return_right, return_type& check_return) { - int height_diff = check_return_right.height - check_return_left.height; + const int height_diff = check_return_right.height - check_return_left.height; (void)height_diff; BOOST_INTRUSIVE_INVARIANT_ASSERT( (height_diff == -1 && node_traits::get_balance(p) == node_traits::negative()) || (height_diff == 0 && node_traits::get_balance(p) == node_traits::zero()) || diff --git a/test/bounded_pointer.hpp b/test/bounded_pointer.hpp index d2672b5..9e89bf2 100644 --- a/test/bounded_pointer.hpp +++ b/test/bounded_pointer.hpp @@ -211,7 +211,7 @@ class bounded_allocator pointer allocate(size_t n) { assert(inited()); - assert(n == 1); + assert(n == 1);(void)n; pointer p; unsigned char i; for (i = 0; i < max_offset && m_in_use[i]; ++i); @@ -224,7 +224,7 @@ class bounded_allocator void deallocate(pointer p, size_t n) { assert(inited()); - assert(n == 1); + assert(n == 1);(void)n; assert(m_in_use[p.m_offset]); m_in_use[p.m_offset] = false; }