]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some warnings in tests 14521/head
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 2 Dec 2022 21:57:25 +0000 (16:57 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 2 Dec 2022 21:58:32 +0000 (16:58 -0500)
tests/base/aligned_vector_memory_02.cc
tests/base/taylor_estimate_function_bounds.cc
tests/distributed_grids/solution_transfer_05.cc
tests/dofs/dof_test.cc
tests/fe/fe_values_views_types.cc
tests/grid/grid_in_out_vtu_01.cc
tests/grid/grid_test.cc
tests/numerics/no_flux_17.cc

index 7a478cd9b3ea9a69e47feb0c9ba0ece737acd04a..f657112ecb47671f4a1497993d3da11efa33f44e 100644 (file)
@@ -83,7 +83,7 @@ void
 test()
 {
   deallog << "---- Creating outer table" << std::endl;
-  Table<1, C> table({1});
+  Table<1, C> table(1);
 
   // Copy the object, then destroy the copy again.
   {
index fa8fee139c520edc334a91e9d9b4f1ba925d56f4..22b21d29e8aa6900c4d203d946d6d82c475bd5c2 100644 (file)
@@ -79,7 +79,7 @@ namespace
     }
 
     SymmetricTensor<2, dim>
-    hessian(const Point<dim> &, const unsigned int) const
+    hessian(const Point<dim> &, const unsigned int) const override
     {
       SymmetricTensor<2, dim> hess;
       for (unsigned int i = 0; i < dim; ++i)
index 50988329cafb1a9c4e3b8b752059b16dce512241..931e03e252b39800ea0d423d606c95a12e7b5519 100644 (file)
@@ -70,7 +70,7 @@ main(int argc, char **argv)
   values[CellId("0_1:2")] = Vector<double>{0.5, 0.5, 0.5, 0.5};
   values[CellId("0_1:3")] = Vector<double>{0.5, 0.1, 0.5, 0.5};
 
-  for (const auto cell : dof_handler.active_cell_iterators())
+  for (const auto &cell : dof_handler.active_cell_iterators())
     if (cell->is_artificial() == false)
       cell->set_dof_values(values[cell->id()], v);
 
index 2b433a66f77e667579707901e49a8b9a82eca42d..6c114e16ccf1c0f5870302b1bfbbca516ef7267c 100644 (file)
@@ -153,13 +153,13 @@ CurvedLine<dim>::get_new_point_on_quad(
 {
   Point<dim> middle = FlatManifold<dim>::get_new_point_on_quad(quad);
 
-  // if the face is at the top of bottom
+  // if the face is at the top or bottom
   // face: do not move the midpoint in
   // x/y direction. Note that if the
   // z-value of the midpoint is either
   // 0 or 1, then the z-values of all
   // vertices of the quad is like that
-  if (dim == 3 && (middle(dim - 1) == 0) || (middle(dim - 1) == 1))
+  if (dim == 3 && ((middle(dim - 1) == 0) || (middle(dim - 1) == 1)))
     return middle;
 
   double x = middle(0), y = middle(1);
index 8100e7ec768c5472767536b430482aae94f3c921..be4e20ce7b39b36184955896b1e1d53cd985bb47 100644 (file)
@@ -27,11 +27,11 @@ test(const Extractor &)
 {
   typename FEValuesViews::View<dim, spacedim, Extractor>::
     template solution_value_type<double>
-      t1;
+      t1{};
 
   typename FEValuesViews::View<dim, spacedim, Extractor>::
     template solution_gradient_type<double>
-      t2;
+      t2{};
 
   deallog << "Test<" << Utilities::dim_string(dim, spacedim) << '>' << std::endl
           << Utilities::type_to_string(t1) << std::endl
index f6e341f7d16174d3c104386154fb43264c1dc9ff..b0b837aca6719761373406bbb25590c8649ef2f3 100644 (file)
@@ -36,14 +36,14 @@ main()
   Triangulation<2> tria2;
   GridGenerator::hyper_ball(tria);
 
-  for (const auto cell : tria.active_cell_iterators())
+  for (const auto &cell : tria.active_cell_iterators())
     {
       if (cell->center()[0] < 0)
         cell->set_refine_flag();
     }
   tria.execute_coarsening_and_refinement();
 
-  for (const auto cell : tria.active_cell_iterators())
+  for (const auto &cell : tria.active_cell_iterators())
     {
       if (cell->center()[1] < 0)
         cell->set_refine_flag();
index c75505658560cb1142061d8ed4f1c74d3c64e649..9bd476f48d7adb713d90557b9a6516988167df22 100644 (file)
@@ -81,7 +81,7 @@ CurvedLine<dim>::get_new_point_on_line(
 {
   Point<dim> middle = FlatManifold<dim>::get_new_point_on_line(line);
 
-  // if the line is at the top of bottom
+  // if the line is at the top or bottom
   // face: do a special treatment on
   // this line. Note that if the
   // z-value of the midpoint is either
@@ -135,7 +135,7 @@ CurvedLine<dim>::get_new_point_on_quad(
   // z-value of the midpoint is either
   // 0 or 1, then the z-values of all
   // vertices of the quad is like that
-  if (dim == 3 && (middle(dim - 1) == 0) || (middle(dim - 1) == 1))
+  if (dim == 3 && ((middle(dim - 1) == 0) || (middle(dim - 1) == 1)))
     return middle;
 
   double x = middle(0), y = middle(1);
index 7536dfddc8761038879efe334939f65416e2cb97..224dd06806b9114a8408ff80137bb792fa4d804f 100644 (file)
@@ -92,8 +92,8 @@ compare_constraints(const AffineConstraints<double> &constraints1,
             }
           for (unsigned int i = 0; i < constraint_entries_1->size(); ++i)
             {
-              if (std::abs((*constraint_entries_1)[i].first !=
-                           (*constraint_entries_2)[i].first) > tol ||
+              if ((*constraint_entries_1)[i].first !=
+                    (*constraint_entries_2)[i].first ||
                   std::abs((*constraint_entries_1)[i].second -
                            (*constraint_entries_2)[i].second) > tol)
                 {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.