From 4c33556fbea2002c3386dd0f717aa7d04ea4577d Mon Sep 17 00:00:00 2001 From: Luc Berger Date: Fri, 10 Jan 2025 13:02:03 -0500 Subject: [PATCH] ODE: fix potentially uninitialized warning from CodeQL (#2477) * ODE: fix potentially uninitialized warning from CodeQL Signed-off-by: Luc Berger-Vergiat * Clang-format Signed-off-by: Luc Berger-Vergiat --------- Signed-off-by: Luc Berger-Vergiat --- ode/impl/KokkosODE_BDF_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ode/impl/KokkosODE_BDF_impl.hpp b/ode/impl/KokkosODE_BDF_impl.hpp index 3e817563da..106eb798bd 100644 --- a/ode/impl/KokkosODE_BDF_impl.hpp +++ b/ode/impl/KokkosODE_BDF_impl.hpp @@ -321,7 +321,7 @@ KOKKOS_FUNCTION void BDFStep(ode_type& ode, scalar_type& t, scalar_type& dt, sca scalar_type max_step = Kokkos::ArithTraits::max(); scalar_type min_step = Kokkos::ArithTraits::min(); - scalar_type safety = 0.675, error_norm; + scalar_type safety = 0.675, error_norm = 0.0; if (dt > max_step) { update_D(order, max_step / dt, coeffs, tempD, D); dt = max_step;