From: Martin Kronbichler Date: Tue, 30 Nov 2021 21:35:43 +0000 (+0100) Subject: Do not use uninitialized variable in tests X-Git-Tag: v9.4.0-rc1~779^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16de6907309e8306b6d4ca47ee42a6fd42da736d;p=dealii.git Do not use uninitialized variable in tests --- diff --git a/tests/matrix_free/multigrid_dg_periodic.cc b/tests/matrix_free/multigrid_dg_periodic.cc index 0ab4b763c2..09606de214 100644 --- a/tests/matrix_free/multigrid_dg_periodic.cc +++ b/tests/matrix_free/multigrid_dg_periodic.cc @@ -273,7 +273,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.loop(&LaplaceOperator::local_diagonal_cell, &LaplaceOperator::local_diagonal_face, &LaplaceOperator::local_diagonal_boundary, diff --git a/tests/matrix_free/multigrid_dg_sip_01.cc b/tests/matrix_free/multigrid_dg_sip_01.cc index f3ae6632ab..381b615514 100644 --- a/tests/matrix_free/multigrid_dg_sip_01.cc +++ b/tests/matrix_free/multigrid_dg_sip_01.cc @@ -282,7 +282,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.loop(&LaplaceOperator::local_diagonal_cell, &LaplaceOperator::local_diagonal_face, &LaplaceOperator::local_diagonal_boundary, diff --git a/tests/matrix_free/multigrid_dg_sip_02.cc b/tests/matrix_free/multigrid_dg_sip_02.cc index 8f610c4509..609cc72576 100644 --- a/tests/matrix_free/multigrid_dg_sip_02.cc +++ b/tests/matrix_free/multigrid_dg_sip_02.cc @@ -285,7 +285,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.cell_loop(&LaplaceOperator::local_diagonal_cell, this, inverse_diagonal_entries, diff --git a/tests/matrix_free/parallel_multigrid.cc b/tests/matrix_free/parallel_multigrid.cc index b9d7f65c98..f0ab3f8a76 100644 --- a/tests/matrix_free/parallel_multigrid.cc +++ b/tests/matrix_free/parallel_multigrid.cc @@ -222,7 +222,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.cell_loop(&LaplaceOperator::local_diagonal_cell, this, inverse_diagonal_entries, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_01.cc b/tests/matrix_free/parallel_multigrid_adaptive_01.cc index 7647e3c795..1dfeaf273f 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_01.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_01.cc @@ -330,7 +330,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.cell_loop(&LaplaceOperator::local_diagonal_cell, this, inverse_diagonal_entries, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_03.cc b/tests/matrix_free/parallel_multigrid_adaptive_03.cc index 422fa58860..c5dc325f5d 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_03.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_03.cc @@ -337,7 +337,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.cell_loop(&LaplaceOperator::local_diagonal_cell, this, inverse_diagonal_entries, diff --git a/tests/matrix_free/parallel_multigrid_adaptive_05.cc b/tests/matrix_free/parallel_multigrid_adaptive_05.cc index bd18147d1e..6cb67244a7 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_05.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_05.cc @@ -334,7 +334,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.cell_loop(&LaplaceOperator::local_diagonal_cell, this, inverse_diagonal_entries, diff --git a/tests/matrix_free/parallel_multigrid_fullydistributed.cc b/tests/matrix_free/parallel_multigrid_fullydistributed.cc index 27b0a321f3..fc068d8ae7 100644 --- a/tests/matrix_free/parallel_multigrid_fullydistributed.cc +++ b/tests/matrix_free/parallel_multigrid_fullydistributed.cc @@ -226,7 +226,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.cell_loop(&LaplaceOperator::local_diagonal_cell, this, inverse_diagonal_entries, diff --git a/tests/matrix_free/parallel_multigrid_mf.cc b/tests/matrix_free/parallel_multigrid_mf.cc index e75b03cc9f..60467a8c65 100644 --- a/tests/matrix_free/parallel_multigrid_mf.cc +++ b/tests/matrix_free/parallel_multigrid_mf.cc @@ -222,7 +222,7 @@ private: compute_inverse_diagonal() { data.initialize_dof_vector(inverse_diagonal_entries); - unsigned int dummy; + unsigned int dummy = 0; data.cell_loop(&LaplaceOperator::local_diagonal_cell, this, inverse_diagonal_entries,