From 8e8faee17742c5d231c3648e6249af9600fb04dd Mon Sep 17 00:00:00 2001
From: Eric Bechet <eric.bechet@ulg.ac.be>
Date: Fri, 27 May 2011 13:23:38 +0000
Subject: [PATCH] uninitialized stuff

---
 Common/Context.cpp       | 19 +++++++++++++++++--
 Solver/linearSystemCSR.h |  2 +-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/Common/Context.cpp b/Common/Context.cpp
index 8cda494708..34f813b1e5 100644
--- a/Common/Context.cpp
+++ b/Common/Context.cpp
@@ -51,11 +51,26 @@ CTX::CTX()
   drawRotationCenter = 0;
   pickElements = 0;
   geom.draw = 1;
+  
   mesh.draw = 1;
-  post.draw = 1;
-  lock = 0; // very primitive locking
+  mesh.qualityInf = mesh.qualitySup = mesh.radiusInf = mesh.radiusSup = mesh.qualityType = 0;
+  mesh.triangles = mesh.tetrahedra = mesh.quadrangles = mesh.prisms = mesh.pyramids = mesh.hexahedra = mesh.lines = 0;
+  mesh.volumesEdges = mesh.volumesFaces = mesh.surfacesEdges = mesh.surfacesFaces = 0;
+  mesh.volumesFaces = mesh.surfacesEdges = mesh.surfacesFaces = 0;
+  mesh.smoothInternalEdges = mesh.smoothNormals = mesh.reverseAllNormals = mesh.explode = mesh.angleSmoothNormals = 0;
+  mesh.colorCarousel = 0;
   mesh.changed = 0;
+  
+  color.mesh.tangents = color.mesh.tetrahedron = color.mesh.triangle = color.mesh.prism = color.mesh.pyramid = color.mesh.hexahedron = 0;
+  color.mesh.tangents = color.mesh.line = color.mesh.quadrangle = 0;
+    for (int i = 0; i < 20; i++)
+        color.mesh.carousel[i] = 0;
+
+  post.draw = 1;
   post.combineTime = 0; // try to combineTime views at startup
+  
+  lock = 0; // very primitive locking
+    
 #if defined(HAVE_FLTK)
   glFontEnum = FL_HELVETICA;
 #else
diff --git a/Solver/linearSystemCSR.h b/Solver/linearSystemCSR.h
index 5c40b1e1a1..411dd97096 100644
--- a/Solver/linearSystemCSR.h
+++ b/Solver/linearSystemCSR.h
@@ -36,7 +36,7 @@ class linearSystemCSR : public linearSystem<scalar> {
   sparsityPattern _sparsity; // only used for pre-allocation, does not store the sparsity once allocated
  public:
   linearSystemCSR()
-    : sorted(false), _a(0), _b(0), _x(0) {}
+    : sorted(false), _entriesPreAllocated(false), _a(0), _b(0), _x(0) {}
   virtual bool isAllocated() const { return _a != 0; }
   virtual void allocate(int) ;
   virtual void clear()
-- 
GitLab