From 10693e08640adee3573c3d3e646bc3b6b6f0ed94 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Tue, 8 Nov 2005 18:26:34 +0000 Subject: [PATCH] FIX completed ignore_unused_variable thanks to Georg Baum --- include/boost/numeric/ublas/functional.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/numeric/ublas/functional.hpp b/include/boost/numeric/ublas/functional.hpp index 8ea07589..d3885dfc 100644 --- a/include/boost/numeric/ublas/functional.hpp +++ b/include/boost/numeric/ublas/functional.hpp @@ -1579,6 +1579,7 @@ namespace boost { namespace numeric { namespace ublas { size_type element (size_type i, size_type size1, size_type j, size_type size2) { BOOST_UBLAS_CHECK (i < size1, bad_index ()); BOOST_UBLAS_CHECK (j < size2, bad_index ()); + detail::ignore_unused_variable_warning(size2); // Guard against size_type overflow BOOST_UBLAS_CHECK (j <= ((std::numeric_limits::max) () - i) / size1, bad_index ()); return i + j * size1; @@ -1588,6 +1589,7 @@ namespace boost { namespace numeric { namespace ublas { size_type address (size_type i, size_type size1, size_type j, size_type size2) { BOOST_UBLAS_CHECK (i <= size1, bad_index ()); BOOST_UBLAS_CHECK (j <= size2, bad_index ()); + detail::ignore_unused_variable_warning(size2); // Guard against size_type overflow - address may be size1 past end of storage BOOST_UBLAS_CHECK (size1 == 0 || j <= ((std::numeric_limits::max) () - i) / size1, bad_index ()); return i + j * size1; @@ -1668,24 +1670,28 @@ namespace boost { namespace numeric { namespace ublas { BOOST_UBLAS_INLINE size_type element1 (size_type /* i */, size_type /* size1 */, size_type j, size_type size2) { BOOST_UBLAS_CHECK (j < size2, bad_index ()); + detail::ignore_unused_variable_warning(size2); return j; } static BOOST_UBLAS_INLINE size_type element2 (size_type i, size_type size1, size_type /* j */, size_type /* size2 */) { BOOST_UBLAS_CHECK (i < size1, bad_index ()); + detail::ignore_unused_variable_warning(size1); return i; } static BOOST_UBLAS_INLINE size_type address1 (size_type /* i */, size_type /* size1 */, size_type j, size_type size2) { BOOST_UBLAS_CHECK (j <= size2, bad_index ()); + detail::ignore_unused_variable_warning(size2); return j; } static BOOST_UBLAS_INLINE size_type address2 (size_type i, size_type size1, size_type /* j */, size_type /* size2 */) { BOOST_UBLAS_CHECK (i <= size1, bad_index ()); + detail::ignore_unused_variable_warning(size1); return i; } static