From 648ad79d803c64f2a0d344c8e0e39f826b30055d Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Wed, 29 Nov 2023 18:20:30 +0100 Subject: [PATCH] Fix warning 'Bti' is used uninitialized --- .../tracker/tt_mi/src/tools/vpTemplateTrackerMIBSpline.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/tracker/tt_mi/src/tools/vpTemplateTrackerMIBSpline.cpp b/modules/tracker/tt_mi/src/tools/vpTemplateTrackerMIBSpline.cpp index 1bbb006c38..29302d725d 100644 --- a/modules/tracker/tt_mi/src/tools/vpTemplateTrackerMIBSpline.cpp +++ b/modules/tracker/tt_mi/src/tools/vpTemplateTrackerMIBSpline.cpp @@ -407,6 +407,12 @@ void vpTemplateTrackerMIBSpline::PutTotPVBspline4(double *Prt, double *dPrt, dou double Bti[4]; double dBti[4]; double d2Bti[4]; + + for (size_t i = 0; i < 4; ++i) { + Bti[i] = 0.; + dBti[i] = 0.; + d2Bti[i] = 0.; + } double *ptBti = &Bti[0]; double *ptdBti = &dBti[0];