From 9428b951ee664c51854d1363932aeb86bbd7c711 Mon Sep 17 00:00:00 2001 From: Luc Berger-Vergiat Date: Thu, 9 Jan 2025 14:12:00 -0700 Subject: [PATCH 1/2] ODE: fix potentially uninitialized warning from CodeQL 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..9f821765ae 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; From 69c93a6342dfc012a1abe167015c6097cd860de4 Mon Sep 17 00:00:00 2001 From: Luc Berger-Vergiat Date: Thu, 9 Jan 2025 14:14:32 -0700 Subject: [PATCH 2/2] Clang-format 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 9f821765ae..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 = 0.0; + 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;