From 2c2c114995a1783883a882b83343a0533d2ebaf5 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 15 Jan 2019 16:53:15 +0100 Subject: Silent maybe-uninitialized warnings by gcc --- Eigen/src/Core/Visitor.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Eigen/src/Core/Visitor.h') diff --git a/Eigen/src/Core/Visitor.h b/Eigen/src/Core/Visitor.h index b11d87e9f..f67d83bd1 100644 --- a/Eigen/src/Core/Visitor.h +++ b/Eigen/src/Core/Visitor.h @@ -137,6 +137,8 @@ namespace internal { template struct coeff_visitor { + // default initialization to avoid countless invalid maybe-uninitialized warnings by gcc + coeff_visitor() : row(-1), col(-1), res(0) {} typedef typename Derived::Scalar Scalar; Index row, col; Scalar res; -- cgit v1.2.3