Introduce a TEST_SET_BUT_UNUSED_VARIABLE macro for initialized but unused variables in the unit tests and also fix a few other warnings.

This commit is contained in:
Gael Guennebaud
2013-06-25 11:42:04 +02:00
parent 4cc9377941
commit 95f8a738ea
17 changed files with 29 additions and 36 deletions

View File

@@ -211,8 +211,8 @@ void test_triangular()
int maxsize = (std::min)(EIGEN_TEST_MAX_SIZE,20);
for(int i = 0; i < g_repeat ; i++)
{
int r = internal::random<int>(2,maxsize); r=r; // shuts down ICC's remark #593: variable "s" was set but never used
int c = internal::random<int>(2,maxsize); c=c;
int r = internal::random<int>(2,maxsize); TEST_SET_BUT_UNUSED_VARIABLE(r)
int c = internal::random<int>(2,maxsize); TEST_SET_BUT_UNUSED_VARIABLE(c)
CALL_SUBTEST_1( triangular_square(Matrix<float, 1, 1>()) );
CALL_SUBTEST_2( triangular_square(Matrix<float, 2, 2>()) );