aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core
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 /Eigen/src/Core
parent2a64fa49475b64a7c7bcd560359d5f67180322e3 (diff)
Made the supression of unused variables portable.
EIGEN_UNUSED is not supported on non GCC systems.
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r--Eigen/src/Core/products/GeneralMatrixMatrix.h3
-rw-r--r--Eigen/src/Core/util/Macros.h3
-rw-r--r--Eigen/src/Core/util/Memory.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/Eigen/src/Core/products/GeneralMatrixMatrix.h b/Eigen/src/Core/products/GeneralMatrixMatrix.h
index 3286379e8..07721145a 100644
--- a/Eigen/src/Core/products/GeneralMatrixMatrix.h
+++ b/Eigen/src/Core/products/GeneralMatrixMatrix.h
@@ -160,7 +160,8 @@ static void run(Index rows, Index cols, Index depth,
else
#endif // EIGEN_HAS_OPENMP
{
- (void)info; // info is not used
+ EIGEN_UNUSED_VARIABLE(info);
+
// this is the sequential version!
Scalar* blockA = ei_aligned_stack_new(Scalar, kc*mc);
std::size_t sizeB = kc*Blocking::PacketSize*Blocking::nr + kc*cols;
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h
index 82045b37c..061767039 100644
--- a/Eigen/src/Core/util/Macros.h
+++ b/Eigen/src/Core/util/Macros.h
@@ -176,6 +176,9 @@
#define EIGEN_UNUSED
#endif
+// Suppresses 'unused variable' warnings.
+#define EIGEN_UNUSED_VARIABLE(var) (void)var;
+
#if (defined __GNUC__)
#define EIGEN_ASM_COMMENT(X) asm("#"X)
#else
diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h
index 6b202dbc8..c67b9774f 100644
--- a/Eigen/src/Core/util/Memory.h
+++ b/Eigen/src/Core/util/Memory.h
@@ -218,7 +218,7 @@ inline void ei_aligned_free(void *ptr)
**/
inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size)
{
- (void)old_size; // Suppress 'unused variable' warning. Seen in boost tee.
+ EIGEN_UNUSED_VARIABLE(old_size);
void *result;
#if !EIGEN_ALIGN