From: Martin Kronbichler Date: Sun, 18 Sep 2022 13:51:09 +0000 (+0200) Subject: Make sure not to work with possibly uninitialized variables X-Git-Tag: v9.5.0-rc1~958^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14280%2Fhead;p=dealii.git Make sure not to work with possibly uninitialized variables --- diff --git a/tests/matrix_free/stokes_computation.cc b/tests/matrix_free/stokes_computation.cc index baf0623f19..58a4c813df 100644 --- a/tests/matrix_free/stokes_computation.cc +++ b/tests/matrix_free/stokes_computation.cc @@ -256,7 +256,7 @@ namespace StokesClass // apply the top right block { LinearAlgebra::distributed::BlockVector dst_tmp(dst); - dst_tmp.block(0) *= 0.0; + dst_tmp.block(0) = 0.0; stokes_matrix.vmult(utmp, dst_tmp); // B^T utmp.block(0) *= -1.0; utmp.block(0) += src.block(0); diff --git a/tests/numerics/no_flux_18.cc b/tests/numerics/no_flux_18.cc index 5bd134fdcf..7d42a17830 100644 --- a/tests/numerics/no_flux_18.cc +++ b/tests/numerics/no_flux_18.cc @@ -257,7 +257,7 @@ namespace StokesClass // apply the top right block { LinearAlgebra::distributed::BlockVector dst_tmp(dst); - dst_tmp.block(0) *= 0.0; + dst_tmp.block(0) = 0.0; stokes_matrix.vmult(utmp, dst_tmp); // B^T utmp.block(0) *= -1.0; utmp.block(0) += src.block(0);