aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-08 15:52:00 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-08 15:52:00 +0200
commit4c5778d29da3ddb21b3f1c64b8179571c7ba8847 (patch)
tree467023b7c1fdd44d724c6ed70fd8aa47a6a0a9e3 /test
parent2a64fa49475b64a7c7bcd560359d5f67180322e3 (diff)
Made the supression of unused variables portable.
EIGEN_UNUSED is not supported on non GCC systems.
Diffstat (limited to 'test')
-rw-r--r--test/first_aligned.cpp5
-rw-r--r--test/triangular.cpp4
2 files changed, 4 insertions, 5 deletions
diff --git a/test/first_aligned.cpp b/test/first_aligned.cpp
index 5fb806298..687f4a5dc 100644
--- a/test/first_aligned.cpp
+++ b/test/first_aligned.cpp
@@ -34,9 +34,8 @@ void test_first_aligned_helper(Scalar *array, int size)
template<typename Scalar>
void test_none_aligned_helper(Scalar *array, int size)
{
- // Suppress 'unreferenced formal parameter's warnings.
- (void)array;
- (void)size;
+ EIGEN_UNUSED_VARIABLE(array);
+ EIGEN_UNUSED_VARIABLE(size);
VERIFY(ei_packet_traits<Scalar>::size == 1 || ei_first_aligned(array, size) == size);
}
diff --git a/test/triangular.cpp b/test/triangular.cpp
index d6d64e595..12452515e 100644
--- a/test/triangular.cpp
+++ b/test/triangular.cpp
@@ -235,8 +235,8 @@ void test_triangular()
{
for(int i = 0; i < g_repeat ; i++)
{
- EIGEN_UNUSED int r = ei_random<int>(2,20);
- EIGEN_UNUSED int c = ei_random<int>(2,20);
+ int r = ei_random<int>(2,20); EIGEN_UNUSED_VARIABLE(r);
+ int c = ei_random<int>(2,20); EIGEN_UNUSED_VARIABLE(c);
CALL_SUBTEST_1( triangular_square(Matrix<float, 1, 1>()) );
CALL_SUBTEST_2( triangular_square(Matrix<float, 2, 2>()) );