]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid uninitialized value in GridIn::read_mesh
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 23 Apr 2018 13:59:23 +0000 (15:59 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 23 Apr 2018 21:16:48 +0000 (23:16 +0200)
source/grid/grid_in.cc

index d46cdc11b7b81f4752ec1dffe2df13306b1315ff..737840fc752268bbbf5b710d554b1270222a7972 100644 (file)
@@ -1530,7 +1530,7 @@ void GridIn<dim, spacedim>::read_msh (std::istream &in)
       else if (cell_type == 15)
         {
           // read the indices of nodes given
-          unsigned int node_index;
+          unsigned int node_index = 0;
           switch (gmsh_file_format)
             {
             case 1:
@@ -1544,6 +1544,8 @@ void GridIn<dim, spacedim>::read_msh (std::istream &in)
               in >> node_index;
               break;
             }
+            default:
+              Assert(false, ExcInternalError());
             }
 
           // we only care about boundary indicators assigned to individual

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.