From 4378bf71922ce93a387d73eb767847b72b05847f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 15 Mar 2012 15:13:03 +0100 Subject: [PATCH] Initialise all tpfa_solution members to zero (i.e., NULL). This is in anticipation of introducing additional structure members to represent solution variables associated with wells whilst having the compiler generate the appropriate null pointers to aid debugging. Unfortunately, GCC warns about the standard "structure = { 0 }" idiom under -Wmissing-field-initializers which is enabled by default under "-Wextra". --- opm/core/pressure/IncompTpfa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/pressure/IncompTpfa.cpp b/opm/core/pressure/IncompTpfa.cpp index 68e0e8e3b..a66ab4cbb 100644 --- a/opm/core/pressure/IncompTpfa.cpp +++ b/opm/core/pressure/IncompTpfa.cpp @@ -118,7 +118,7 @@ namespace Opm pressure.resize(grid_.number_of_cells); faceflux.resize(grid_.number_of_faces); - ifs_tpfa_solution soln; + ifs_tpfa_solution soln = { 0 }; soln.cell_press = &pressure[0]; soln.face_flux = &faceflux[0];