mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
16
test/main.h
16
test/main.h
@@ -31,6 +31,10 @@
|
||||
// B0 is defined in POSIX header termios.h
|
||||
#define B0 FORBIDDEN_IDENTIFIER
|
||||
|
||||
|
||||
// shuts down ICC's remark #593: variable "XXX" was set but never used
|
||||
#define TEST_SET_BUT_UNUSED_VARIABLE(X) X = X + 0;
|
||||
|
||||
// the following file is automatically generated by cmake
|
||||
#include "split_test_helper.h"
|
||||
|
||||
@@ -380,13 +384,13 @@ template<typename T> struct GetDifferentType<std::complex<T> >
|
||||
|
||||
// Forward declaration to avoid ICC warning
|
||||
template<typename T> std::string type_name();
|
||||
template<typename T> std::string type_name() { return "other"; }
|
||||
template<> std::string type_name<float>() { return "float"; }
|
||||
template<> std::string type_name<double>() { return "double"; }
|
||||
template<> std::string type_name<int>() { return "int"; }
|
||||
template<> std::string type_name<std::complex<float> >() { return "complex<float>"; }
|
||||
template<typename T> std::string type_name() { return "other"; }
|
||||
template<> std::string type_name<float>() { return "float"; }
|
||||
template<> std::string type_name<double>() { return "double"; }
|
||||
template<> std::string type_name<int>() { return "int"; }
|
||||
template<> std::string type_name<std::complex<float> >() { return "complex<float>"; }
|
||||
template<> std::string type_name<std::complex<double> >() { return "complex<double>"; }
|
||||
template<> std::string type_name<std::complex<int> >() { return "complex<int>"; }
|
||||
template<> std::string type_name<std::complex<int> >() { return "complex<int>"; }
|
||||
|
||||
// forward declaration of the main test function
|
||||
void EIGEN_CAT(test_,EIGEN_TEST_FUNC)();
|
||||
|
||||
Reference in New Issue
Block a user