mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Made the supression of unused variables portable.
EIGEN_UNUSED is not supported on non GCC systems.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user