From b23ba5a31803d6e68ced85fc5a168723cf657620 Mon Sep 17 00:00:00 2001 From: Eric Cano Date: Fri, 28 May 2021 16:13:22 +0200 Subject: [PATCH] Resolved uninitialized value warning in RecoPixelVertexing/PixelTrackFitting. This resolves the warning: Eigen/src/Core/functors/AssignmentFunctors.h:92:62: warning: '*((void*)& p3D +88)' is used uninitialized in this function [-Wuninitialized] 92 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a *= b; } | ~~^~~~ The last row of the matrix is not initialized yet, and gets initialized right after. --- RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h b/RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h index 52cf4b637fb37..7e411e6110179 100644 --- a/RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h +++ b/RecoPixelVertexing/PixelTrackFitting/interface/RiemannFit.h @@ -515,7 +515,7 @@ namespace riemannFit { // scale const double tempQ = mc.squaredNorm(); const double tempS = sqrt(n * 1. / tempQ); // scaling factor - p3D *= tempS; + p3D.block(0, 0, 2, n) *= tempS; // project on paraboloid p3D.row(2) = p3D.block(0, 0, 2, n).colwise().squaredNorm();