Remove trailing semicolon from EIGEN_UNUSED_VARIABLE macro

libeigen/eigen!2301

Closes #3007

Co-authored-by: Pavel Guzenfeld <67074795+PavelGuzenfeld@users.noreply.github.com>
This commit is contained in:
Pavel Guzenfeld
2026-03-21 23:54:13 +00:00
committed by Rasmus Munk Larsen
parent e0b8498eef
commit a0e30732a7
38 changed files with 156 additions and 229 deletions

View File

@@ -131,7 +131,7 @@ class DenseStorage_impl<T, Size, Dynamic, Cols, Options> {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl(Index size, Index rows, Index /*cols*/)
: m_rows(rows) {
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
EIGEN_UNUSED_VARIABLE(size)
EIGEN_UNUSED_VARIABLE(size);
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl& operator=(const DenseStorage_impl& other) {
smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
@@ -165,7 +165,7 @@ class DenseStorage_impl<T, Size, Rows, Dynamic, Options> {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl(Index size, Index /*rows*/, Index cols)
: m_cols(cols) {
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
EIGEN_UNUSED_VARIABLE(size)
EIGEN_UNUSED_VARIABLE(size);
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl& operator=(const DenseStorage_impl& other) {
smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
@@ -200,7 +200,7 @@ class DenseStorage_impl<T, Size, Dynamic, Dynamic, Options> {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl(Index size, Index rows, Index cols)
: m_rows(rows), m_cols(cols) {
EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({})
EIGEN_UNUSED_VARIABLE(size)
EIGEN_UNUSED_VARIABLE(size);
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl& operator=(const DenseStorage_impl& other) {
smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);

View File

@@ -367,7 +367,7 @@ struct redux_impl<Func, Evaluator, LinearVectorizedTraversal, CompleteUnrolling>
template <typename XprType>
EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Evaluator& eval, const Func& func, const XprType& xpr) {
EIGEN_ONLY_USED_FOR_DEBUG(xpr)
EIGEN_ONLY_USED_FOR_DEBUG(xpr);
eigen_assert(xpr.rows() > 0 && xpr.cols() > 0 && "you are using an empty matrix");
if (VectorizedSize > 0) {
Scalar res = func.predux(

View File

@@ -281,7 +281,7 @@ class Ref : public RefBase<Ref<PlainObjectType, Options, StrideType> > {
EIGEN_STATIC_ASSERT(bool(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);
// Construction must pass since we will not create temporary storage in the non-const case.
const bool success = Base::construct(expr.derived());
EIGEN_UNUSED_VARIABLE(success)
EIGEN_UNUSED_VARIABLE(success);
eigen_assert(success);
}
template <typename Derived>
@@ -299,7 +299,7 @@ class Ref : public RefBase<Ref<PlainObjectType, Options, StrideType> > {
EIGEN_STATIC_ASSERT(!Derived::IsPlainObjectBase, THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY);
// Construction must pass since we will not create temporary storage in the non-const case.
const bool success = Base::construct(expr.const_cast_derived());
EIGEN_UNUSED_VARIABLE(success)
EIGEN_UNUSED_VARIABLE(success);
eigen_assert(success);
}
@@ -371,7 +371,7 @@ class Ref<const TPlainObjectType, Options, StrideType>
EIGEN_DEVICE_FUNC void construct(const Expression& expr, internal::false_type) {
internal::call_assignment_no_alias(m_object, expr, internal::assign_op<Scalar, Scalar>());
const bool success = Base::construct(m_object);
EIGEN_ONLY_USED_FOR_DEBUG(success)
EIGEN_ONLY_USED_FOR_DEBUG(success);
eigen_assert(success);
}

View File

@@ -1866,7 +1866,7 @@ EIGEN_ALWAYS_INLINE void disassembleResults(__vector_quad* c0, PacketBlock<Scala
if (GEMV_GETN_COMPLEX(N) > iter1) { \
if (GEMV_IS_COMPLEX_FLOAT) { \
GEMV_LOADPAIR2_COL_COMPLEX_MMA(iter2, iter2); \
EIGEN_UNUSED_VARIABLE(a##iter3) \
EIGEN_UNUSED_VARIABLE(a##iter3); \
} else { \
GEMV_LOADPAIR2_COL_COMPLEX_MMA(iter2, iter2 << 1); \
GEMV_LOADPAIR2_COL_COMPLEX_MMA(iter3, iter3 << 1); \

View File

@@ -314,9 +314,9 @@ inline bool useSpecificBlockingSizes(Index& k, Index& m, Index& n) {
return true;
}
#else
EIGEN_UNUSED_VARIABLE(k)
EIGEN_UNUSED_VARIABLE(m)
EIGEN_UNUSED_VARIABLE(n)
EIGEN_UNUSED_VARIABLE(k);
EIGEN_UNUSED_VARIABLE(m);
EIGEN_UNUSED_VARIABLE(n);
#endif
return false;
}

View File

@@ -1051,7 +1051,7 @@ template <typename T>
EIGEN_DEVICE_FUNC constexpr void ignore_unused_variable(const T&) {}
} // namespace internal
} // namespace Eigen
#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var);
#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var)
#if !defined(EIGEN_ASM_COMMENT)
#if EIGEN_COMP_GNUC && (EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM_OR_ARM64 || EIGEN_ARCH_RISCV)

View File

@@ -267,7 +267,7 @@ EIGEN_DEVICE_FUNC inline void* aligned_realloc(void* ptr, std::size_t new_size,
void* result;
#if (EIGEN_DEFAULT_ALIGN_BYTES == 0) || EIGEN_MALLOC_ALREADY_ALIGNED
EIGEN_UNUSED_VARIABLE(old_size)
EIGEN_UNUSED_VARIABLE(old_size);
check_that_malloc_is_allowed();
EIGEN_USING_STD(realloc)