|
Ublas : |
From: Christophe Prud'homme (prudhomm_at_[hidden])
Date: 2005-10-28 10:43:37
Michael, Angus,
here is a larger patch that uses boost::ignore_unused_variable_warning(it);
we make heavy use of ublas and the warnings appeared in many other places than
the ones below
the patch was made against CVS 1.33.1 and is attached to this email
Michael, I now participate in the boost packaging in the Boost Debian Team :)
and in particular I will look after ublas support.
I already applied the 1.33 ->1.33.1 patch to our boost tree, and I will apply
the patch attached.
Best regards
C.
[ Lundi 24 Octobre 2005 13:29 ]
| Hi, Michael.
|
| compiling some code with 'g++ -DNDEBUG -O2 -W -Wall', I'm getting a
| couple of warnings about unused variables:
|
| boost/numeric/ublas/vector.hpp:721: warning: unused parameter 'it'
| boost/numeric/ublas/functional.hpp:1390: warning: unused parameter
| 'size1'
|
| Looking at the code, it is clear that the human reader is clever than
| the compiler here, because it is perfectly obvious that the variable
| is used after all, albeit only in debug mode. Stupid compilers :)
|
| Here's a patch that modifies the code like so:
|
| +#include <boost/concept_check.hpp>
|
| // Comparison
| BOOST_UBLAS_INLINE
| bool operator == (const const_iterator &it) const {
| BOOST_UBLAS_CHECK (&(*this) () == &it (), external_logic ());
| + boost::ignore_unused_variable_warning(it);
| return true;
| }
|
| (It also replaces a few TAB characters that appear to have slipped
| in ;)
|
| Regards,
| Angus
-- MIT Affiliate Debian/GNU/Linux developer for scientific computing packages fingerprint = 3703 50DE 7A9F 024E 0F26 0D07 A18F B40B D4BE 1450