From 01f144905cb740c26ab5314c1708c9f93b9a3b48 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 25 Feb 2003 04:02:52 +0000
Subject: [PATCH] Fix all "uninitialized var" gcc warnings, even if they are
 bogus.

---
 Fltk/Callbacks.cpp       |  8 ++++----
 Fltk/Colorbar_Window.cpp |  6 +++---
 Geo/CAD.cpp              |  8 ++++----
 Geo/DataBase.cpp         |  4 ++--
 Geo/StepGeomDatabase.cpp | 29 ++++++++++++++++++++---------
 Graphics/Geom.cpp        |  6 +++---
 Graphics/Graph2D.cpp     |  4 ++--
 Graphics/Post.cpp        |  4 ++--
 Graphics/PostElement.cpp |  6 +++---
 Graphics/gl2gif.cpp      | 10 +++++-----
 Mesh/2D_InitMesh.cpp     |  4 ++--
 Mesh/2D_Mesh.cpp         |  6 +++---
 Mesh/2D_Mesh_Aniso.cpp   |  6 +++---
 Mesh/2D_Util.cpp         |  6 +++---
 Mesh/3D_Bricks.cpp       |  4 ++--
 Mesh/3D_Coherence.cpp    |  6 +++---
 Mesh/3D_Divide.cpp       |  7 ++++---
 Mesh/3D_Extrude.cpp      |  4 ++--
 Mesh/3D_Mesh.cpp         |  4 ++--
 Mesh/Metric.cpp          |  6 +++---
 Mesh/Read_Mesh.cpp       |  4 ++--
 Mesh/SMS.cpp             |  4 ++--
 Mesh/SwapEdge.cpp        |  4 ++--
 Mesh/Utils.cpp           |  6 +++---
 Numeric/gsl_newt.cpp     |  4 ++--
 25 files changed, 86 insertions(+), 74 deletions(-)

diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 74e0044781..b1d0ee0f9a 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.163 2003-01-25 20:31:54 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.164 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -144,7 +144,7 @@ int SetGlobalShortcut(int event){
 }
 
 int SelectContour (int type, int num, List_T *Liste1){
-  int      k,ip,i;
+  int      k=0,ip,i;
   List_T  *Liste2;
 
   Liste2 = List_Create(1,1,sizeof(int));
@@ -1420,7 +1420,7 @@ static void _transform_point_curve_surface(int transfo, int mode, char *what){
   Vertex   *v;
   Curve    *c;
   Surface  *s;
-  int type, num;
+  int type, num=0;
 
   if(!strcmp(what,"Point")) {
     type = ENT_POINT;
@@ -1835,7 +1835,7 @@ static void _add_transfinite(int dim){
   Vertex   *v;
   Curve    *c;
   Surface  *s;
-  int      ib;
+  int      ib=0;
   static int n, p[100];
 
   if(!opt_geometry_points(0,GMSH_GET,0)){
diff --git a/Fltk/Colorbar_Window.cpp b/Fltk/Colorbar_Window.cpp
index 891b5eea30..a37765deac 100644
--- a/Fltk/Colorbar_Window.cpp
+++ b/Fltk/Colorbar_Window.cpp
@@ -1,4 +1,4 @@
-// $Id: Colorbar_Window.cpp,v 1.30 2003-02-14 03:45:10 geuzaine Exp $
+// $Id: Colorbar_Window.cpp,v 1.31 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -156,9 +156,9 @@ int Colorbar_Window::y_to_intensity(int y){
 
 void Colorbar_Window::redraw_range(int a, int b){
    int i;
-   int x,y, px,py;
+   int x,y, px=0,py=0;
    int x1, y1, x2, y2;
-   int intensity;
+   int intensity=0;
    double H,S,V;
 
    make_current();
diff --git a/Geo/CAD.cpp b/Geo/CAD.cpp
index 76dba7a5a0..3087e802ec 100644
--- a/Geo/CAD.cpp
+++ b/Geo/CAD.cpp
@@ -1,4 +1,4 @@
-// $Id: CAD.cpp,v 1.57 2003-02-21 09:39:01 remacle Exp $
+// $Id: CAD.cpp,v 1.58 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -1697,10 +1697,10 @@ bool ProjectPointOnCurve (Curve *c, Vertex *v, Vertex *RES, Vertex *DER){
 
 bool search_in_boundary (Surface *s, Vertex *p, double t, int Fixu, 
 			 double *uu, double *vv){
-  double l,umin,vmin,lmin = 1.e24;
-  int i,N;
+  double l, umin = 0., vmin = 0., lmin = 1.e200;
+  int i, N;
   Vertex vr;
-  double tmin, tmax,u,v;
+  double tmin, tmax, u, v;
   
   if(Fixu){
     tmin = s->kv[0];
diff --git a/Geo/DataBase.cpp b/Geo/DataBase.cpp
index 2a02395349..dd3a8ba2fd 100644
--- a/Geo/DataBase.cpp
+++ b/Geo/DataBase.cpp
@@ -1,4 +1,4 @@
-// $Id: DataBase.cpp,v 1.22 2003-01-23 20:19:20 geuzaine Exp $
+// $Id: DataBase.cpp,v 1.23 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -264,7 +264,7 @@ void Cdbz101(int izon, int typzon,int o1, int o2, int nbu, int nbv,
 
   int      i,j;
   double   f;
-  List_T  *templist;
+  List_T  *templist = NULL;
   Curve   *c, *c0, *c1, *c2;
 
   if(liste){
diff --git a/Geo/StepGeomDatabase.cpp b/Geo/StepGeomDatabase.cpp
index 0f4678a13c..b8bb964209 100644
--- a/Geo/StepGeomDatabase.cpp
+++ b/Geo/StepGeomDatabase.cpp
@@ -1,4 +1,4 @@
-// $Id: StepGeomDatabase.cpp,v 1.11 2003-01-23 20:19:20 geuzaine Exp $
+// $Id: StepGeomDatabase.cpp,v 1.12 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -489,7 +489,7 @@ Step_Closed_Shell_t *Get_Closed_Shell (int Num){
 void Resolve_BREP (void){
   int i,j,k,l;
   double d;
-  int obj,err,typ;
+  int obj,err;
   Step_Vertex_Point_t      vp;
   Step_Direction_t         *d1,*d2;
   Step_Cartesian_Point_t   *pcp,cp;
@@ -504,7 +504,7 @@ void Resolve_BREP (void){
   Step_Axis2_Placement3D_t *axs;
   Step_Closed_Shell_t      cs;
   List_T  *ListInt,*ListIntBis;
-  double ubeg,uend,n[3],t[3],p[3],XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX,L;
+  double ubeg,uend,n[3],t[3],p[3],XMIN=0.,XMAX=0.,YMIN=0.,YMAX=0.,ZMIN=0.,ZMAX=0.,L;
   int fob;
 
   ListInt    = List_Create(2,2,sizeof(int));
@@ -512,12 +512,22 @@ void Resolve_BREP (void){
 
   for(i=0;i<List_Nbr(BREP->AllCartesian_Points);i++){
     List_Read(BREP->AllCartesian_Points,i,&cp);
-    XMAX = MAX(cp.Pos.X,XMAX);
-    YMAX = MAX(cp.Pos.Y,YMAX);
-    ZMAX = MAX(cp.Pos.Z,ZMAX);
-    XMIN = MIN(cp.Pos.X,XMIN);
-    YMIN = MIN(cp.Pos.Y,YMIN);
-    ZMIN = MIN(cp.Pos.Z,ZMIN);
+    if(!i){
+      XMAX = cp.Pos.X;
+      YMAX = cp.Pos.Y;
+      ZMAX = cp.Pos.Z;
+      XMIN = cp.Pos.X;
+      YMIN = cp.Pos.Y;
+      ZMIN = cp.Pos.Z;
+    }
+    else{
+      XMAX = MAX(cp.Pos.X,XMAX);
+      YMAX = MAX(cp.Pos.Y,YMAX);
+      ZMAX = MAX(cp.Pos.Z,ZMAX);
+      XMIN = MIN(cp.Pos.X,XMIN);
+      YMIN = MIN(cp.Pos.Y,YMIN);
+      ZMIN = MIN(cp.Pos.Z,ZMIN);
+    }
   }
   CTX.lc = L = sqrt(SQR(XMIN-XMAX) + SQR(YMIN-YMAX) + SQR(ZMIN-ZMAX));
 
@@ -640,6 +650,7 @@ void Resolve_BREP (void){
         n[0] = d1->Pos.X;n[1] = d1->Pos.Y;n[2] = d1->Pos.Z;
         t[0] = d2->Pos.X;t[1] = d2->Pos.Y;t[2] = d2->Pos.Z;
         p[0] = pcp->Pos.X;p[1] = pcp->Pos.Y;p[2] = pcp->Pos.Z;
+	int typ = 0;
         switch(ps->Typ){
         case STEP_CYLD:
           typ = MSH_SURF_CYLNDR;
diff --git a/Graphics/Geom.cpp b/Graphics/Geom.cpp
index fb56a5614e..5c88d41099 100644
--- a/Graphics/Geom.cpp
+++ b/Graphics/Geom.cpp
@@ -1,4 +1,4 @@
-// $Id: Geom.cpp,v 1.42 2003-01-23 20:19:20 geuzaine Exp $
+// $Id: Geom.cpp,v 1.43 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -265,7 +265,7 @@ int isPointOnPlanarSurface (Surface *S, double X, double Y, double Z, double n[3
 void Draw_Plane_Surface (Surface *s){
   int     i, j, k;
   Curve  *c;
-  double  minx, miny, maxx, maxy, t, n[3], nn;
+  double  minx=0., miny=0., maxx=0., maxy=0., t, n[3], nn;
   Vertex  P1, P2, P3, V[4], vv, vv1, vv2;
   char    Num[100];
 
@@ -423,7 +423,7 @@ void Draw_Plane_Surface (Surface *s){
 
 void Draw_NonPlane_Surface (Surface *s){
   Vertex   v,n1,n2,n3;
-  int      i,NbTics,N;
+  int      i,NbTics,N=0;
   double   u,n[3],nn,nx[3],ny[3];
   double  tics[20];
   double u0, un,v0,vn;
diff --git a/Graphics/Graph2D.cpp b/Graphics/Graph2D.cpp
index c9f4011fd8..1980625614 100644
--- a/Graphics/Graph2D.cpp
+++ b/Graphics/Graph2D.cpp
@@ -1,4 +1,4 @@
-// $Id: Graph2D.cpp,v 1.25 2003-01-23 20:19:20 geuzaine Exp $
+// $Id: Graph2D.cpp,v 1.26 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -97,7 +97,7 @@ static void Draw_Graph2D(Post_View *v,
   double xtop = xx;
   double ytop = CTX.viewport[3]-yy;
   double ybot = ytop-height;
-  double Abs, Val, ValMin, ValMax, AbsMin, AbsMax;
+  double Abs, Val, ValMin=0., ValMax=0., AbsMin, AbsMax;
   double p1[3], p2[3];
 
   if(!v->TransparentScale){
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index 96890bdfa8..447ee39979 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.44 2003-01-23 20:19:20 geuzaine Exp $
+// $Id: Post.cpp,v 1.45 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -281,7 +281,7 @@ void Draw_TensorList(Post_View *v, double ValMin, double ValMax, double Raise[3]
 
 void Draw_Post(void){
   int            iView,j,k,nb;
-  double         ValMin,ValMax,AbsMax;
+  double         ValMin=0.,ValMax=0.,AbsMax;
   Post_View     *v;
 
   if(!CTX.post.list) return;
diff --git a/Graphics/PostElement.cpp b/Graphics/PostElement.cpp
index ef7924165b..ab7130ae7d 100644
--- a/Graphics/PostElement.cpp
+++ b/Graphics/PostElement.cpp
@@ -1,4 +1,4 @@
-// $Id: PostElement.cpp,v 1.9 2003-02-14 09:32:31 stainier Exp $
+// $Id: PostElement.cpp,v 1.10 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -672,7 +672,7 @@ void Draw_ScalarPyramid(Post_View *View, int preproNormals,
 void Draw_VectorElement(int type, Post_View *View, 
 			double ValMin, double ValMax, double Raise[3][8],
 			double *X, double *Y, double *Z, double *V){
-  int    j, k, nbnod ;
+  int    j, k, nbnod=0 ;
   double fact, xx[8], yy[8], zz[8],  xc=0., yc=0., zc=0., Val[8][3], d[8];
   double dx=0., dy=0., dz=0., dd;
   char   Num[100];
@@ -834,7 +834,7 @@ void Draw_VectorPyramid(ARGS){
 void Draw_TensorElement(int type, Post_View *View, 
 			double ValMin, double ValMax, double Raise[3][8],
 			double *X, double *Y, double *Z, double *V){
-  int nbnod ;
+  int nbnod=0 ;
 
   switch(type){
   case POINT : nbnod = 1; break;
diff --git a/Graphics/gl2gif.cpp b/Graphics/gl2gif.cpp
index 4096123959..84d21a60a8 100644
--- a/Graphics/gl2gif.cpp
+++ b/Graphics/gl2gif.cpp
@@ -2,7 +2,7 @@
  * GL2GIF, an OpenGL to GIF Printing Library
  * Copyright (C) 1999-2002  Christophe Geuzaine 
  *
- * $Id: gl2gif.cpp,v 1.15 2002-05-25 19:17:45 geuzaine Exp $
+ * $Id: gl2gif.cpp,v 1.16 2003-02-25 04:02:50 geuzaine Exp $
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -254,7 +254,7 @@ static int sqr(int x){
 }
 
 static int closestcolor(pixel color){
-  int i,r,g,b,d,imin,dmin;
+  int i,r,g,b,d,imin=0,dmin;
   
   r=(int)PPM_GETR(color);
   g=(int)PPM_GETG(color);
@@ -1123,10 +1123,10 @@ void create_gif(FILE *outfile, int width, int height,
   register pixel* pP;
   register int col, row, limitcol, ind;
   int newcolors=256;
-  long *thisrerr, *nextrerr, *thisgerr, *nextgerr;
-  long *thisberr, *nextberr, *temperr;
+  long *thisrerr=NULL, *nextrerr=NULL, *thisgerr=NULL, *nextgerr=NULL;
+  long *thisberr=NULL, *nextberr=NULL, *temperr=NULL;
   register long sr=0, sg=0, sb=0, err=0;
-  int fs_direction;
+  int fs_direction=0;
 
   /* This is stupid, but I couldn't figure out how to pack the data
      directly from the OpenGL frame buffer into unsigned long
diff --git a/Mesh/2D_InitMesh.cpp b/Mesh/2D_InitMesh.cpp
index 68a50aedb5..d3e86ac49a 100644
--- a/Mesh/2D_InitMesh.cpp
+++ b/Mesh/2D_InitMesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_InitMesh.cpp,v 1.16 2003-01-23 20:19:21 geuzaine Exp $
+// $Id: 2D_InitMesh.cpp,v 1.17 2003-02-25 04:02:50 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -199,7 +199,7 @@ void Print ( void *data , void *dummy){
 
 void SwapED ( void *data , void *dummy){
   ED *e,E;
-  int from,to;
+  int from=0,to=0;
 
   e = (ED*)data;
 
diff --git a/Mesh/2D_Mesh.cpp b/Mesh/2D_Mesh.cpp
index 45255de6ea..534ce5c145 100644
--- a/Mesh/2D_Mesh.cpp
+++ b/Mesh/2D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Mesh.cpp,v 1.44 2003-01-23 20:19:21 geuzaine Exp $
+// $Id: 2D_Mesh.cpp,v 1.45 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -112,7 +112,7 @@ void Plan_Moyen (void *data, void *dum){
 
 
 int Calcule_Contours (Surface * s){
-  int i, j, ori, ORI;
+  int i, j, ori, ORI = 0;
   Vertex *v, *first, *last;
   List_T *l, *linv;
   Curve *c;
@@ -669,7 +669,7 @@ void Maillage_Automatique_VieuxCode (Surface * pS, Mesh * m, int ori){
   maillage M;
   int err, i, j, k, N, a, b, d;
   Simplex *s;
-  double Xmin, Xmax, Ymin, Ymax;
+  double Xmin=0., Xmax=0., Ymin=0., Ymax=0.;
 
 
   if (m->BGM.Typ == WITHPOINTS){
diff --git a/Mesh/2D_Mesh_Aniso.cpp b/Mesh/2D_Mesh_Aniso.cpp
index 115f9403d5..6a67cfd4da 100644
--- a/Mesh/2D_Mesh_Aniso.cpp
+++ b/Mesh/2D_Mesh_Aniso.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Mesh_Aniso.cpp,v 1.32 2003-02-12 20:27:12 geuzaine Exp $
+// $Id: 2D_Mesh_Aniso.cpp,v 1.33 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -189,7 +189,7 @@ void Box_2_Triangles (List_T * P, Surface * s){
                            {0, 1} };
   static int tri[2][3] =  { {1, 4, 2},
                             {2, 4, 3} };
-  double Xm, Ym, XM, YM, Xc, Yc;
+  double Xm=0., Ym=0., XM=0., YM=0., Xc=0., Yc=0.;
   Simplex *S, *ps;
   Vertex *V, *v, *pv;
   List_T *smp;
@@ -911,7 +911,7 @@ void suppress_simplex_2D (void *data, void *dum){
 }
 
 Vertex * NewVertex_2D (Simplex * s){
-  Vertex *v;
+  Vertex *v=NULL;
   double lc;
   lc = (s->V[0]->lc + s->V[1]->lc + s->V[2]->lc) / 3. ;
 
diff --git a/Mesh/2D_Util.cpp b/Mesh/2D_Util.cpp
index 5b6cfa5a4a..8ec709834d 100644
--- a/Mesh/2D_Util.cpp
+++ b/Mesh/2D_Util.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Util.cpp,v 1.17 2003-01-23 20:19:21 geuzaine Exp $
+// $Id: 2D_Util.cpp,v 1.18 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -185,9 +185,9 @@ MPoint Localize (Delaunay * del , DocRecord *MESH) {
   */
 
   MPoint       pt,pta,ptb,ptc,ptm;
-  PointNumero  a,b;
+  PointNumero  a=0,b=0;
   double       p,q,val,vec[2],ro,rm;
-  Delaunay    *v1,*v2,*v3,*del2 ;
+  Delaunay    *v1,*v2,*v3,*del2=NULL;
 
   switch (LocalNewPoint) {
 
diff --git a/Mesh/3D_Bricks.cpp b/Mesh/3D_Bricks.cpp
index e83b7f66d9..5343061490 100644
--- a/Mesh/3D_Bricks.cpp
+++ b/Mesh/3D_Bricks.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Bricks.cpp,v 1.11 2003-01-23 20:19:21 geuzaine Exp $
+// $Id: 3D_Bricks.cpp,v 1.12 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -102,7 +102,7 @@ void findminmax (void *a, void *b){
 
 void AddSimplexInGrid (Mesh * m, Simplex * s, int boule_boite){
 
-  double XminBox, XmaxBox, YminBox, YmaxBox, ZmaxBox, ZminBox;
+  double XminBox=0., XmaxBox=0., YminBox=0., YmaxBox=0., ZmaxBox=0., ZminBox=0.;
   int Ix1, Ix2, Iy1, Iy2, Iz1, Iz2;
   int i, j, k, index;
   Brick Br, *pBrick;
diff --git a/Mesh/3D_Coherence.cpp b/Mesh/3D_Coherence.cpp
index 781f1d2545..ec23e1061b 100644
--- a/Mesh/3D_Coherence.cpp
+++ b/Mesh/3D_Coherence.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Coherence.cpp,v 1.27 2003-01-23 20:19:21 geuzaine Exp $
+// $Id: 3D_Coherence.cpp,v 1.28 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -592,7 +592,7 @@ Vertex *Edge_Edge (Edge * e, Vertex * v1, Vertex * v2){
   double mat[2][2];
   double b[3], res[3];
   double XmaxS, XminS, YmaxS, YminS, ZmaxS, ZminS, lc;
-  double XmaxV, XminV, YmaxV, YminV, ZmaxV, ZminV, val;
+  double XmaxV, XminV, YmaxV, YminV, ZmaxV, ZminV, val=0.;
 
   if (!compareVertex (&e->V[0], &v1))
     return NULL;
@@ -814,7 +814,7 @@ List_T *NewPoints;
 
 void Intersect_Edge_Simplexe (Edge * e, Simplex * s, Intersection * I){
 
-  int i, NbInt, NbVer, NbEdg, NbFac, j;
+  int i, NbInt=0, NbVer=0, NbEdg=0, NbFac=0, j;
   Vertex *v;
   double XminS, YminS, ZminS, XmaxS, YmaxS, ZmaxS;
   double XminE, YminE, ZminE, XmaxE, YmaxE, ZmaxE;
diff --git a/Mesh/3D_Divide.cpp b/Mesh/3D_Divide.cpp
index ee8b2db947..81633e4218 100644
--- a/Mesh/3D_Divide.cpp
+++ b/Mesh/3D_Divide.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Divide.cpp,v 1.18 2003-01-23 20:19:21 geuzaine Exp $
+// $Id: 3D_Divide.cpp,v 1.19 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -306,8 +306,9 @@ void cut_tetraedre (Intersection * pI, Tree_T * AddedTet, Tree_T * TetDel,
   int i;
   nxn nx;
   Simplex *s;
-  Vertex *common, *other1, *other2, *lonely, *e1, *e2, *point1, *point2, *point3, *point4;
-  Vertex *v1, *v2, *v3, *v4, *v5, *v6, *v7, *v8;
+  Vertex *common, *other1, *other2, *lonely=NULL, *e1, *e2;
+  Vertex *point1=NULL, *point2=NULL, *point3=NULL, *point4=NULL;
+  Vertex *v1=NULL, *v2=NULL, *v3=NULL, *v4=NULL, *v5=NULL, *v6=NULL, *v7=NULL, *v8=NULL;
 
   if (!New_Edges)
     New_Edges = Tree_Create (sizeof (nxn), compnxn);
diff --git a/Mesh/3D_Extrude.cpp b/Mesh/3D_Extrude.cpp
index 5299404248..dec3ae3e48 100644
--- a/Mesh/3D_Extrude.cpp
+++ b/Mesh/3D_Extrude.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Extrude.cpp,v 1.58 2003-02-05 22:48:46 geuzaine Exp $
+// $Id: 3D_Extrude.cpp,v 1.59 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -339,7 +339,7 @@ void Extrude_Simplex_Phase3 (void *data, void *dum){
   Simplex **pS, *s, *news;
   int i, j, k;
   Vertex *v[8];
-  List_T *L0, *L1, *L2, *L3;
+  List_T *L0, *L1, *L2, *L3=NULL;
 
   pS = (Simplex **) data;
   s = *pS;
diff --git a/Mesh/3D_Mesh.cpp b/Mesh/3D_Mesh.cpp
index 7545871b72..824d8fa584 100644
--- a/Mesh/3D_Mesh.cpp
+++ b/Mesh/3D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Mesh.cpp,v 1.46 2003-02-12 09:20:41 remacle Exp $
+// $Id: 3D_Mesh.cpp,v 1.47 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -373,7 +373,7 @@ void Box_6_Tetraedron (List_T * P, Mesh * m){
                            {6, 4, 8, 7},
                            {6, 4, 7, 3},
                            {2, 3, 4, 6}};
-  double Xm, Ym, Zm, XM, YM, ZM, Xc, Yc, Zc;
+  double Xm=0., Ym=0., Zm=0., XM=0., YM=0., ZM=0., Xc, Yc, Zc;
   Simplex *S, *ps;
   Vertex *V, *v, *pv;
   List_T *smp;
diff --git a/Mesh/Metric.cpp b/Mesh/Metric.cpp
index 97a8302dd7..939158782d 100644
--- a/Mesh/Metric.cpp
+++ b/Mesh/Metric.cpp
@@ -1,4 +1,4 @@
-// $Id: Metric.cpp,v 1.15 2003-01-23 20:19:22 geuzaine Exp $
+// $Id: Metric.cpp,v 1.16 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -96,7 +96,7 @@ GMSHMetric::GMSHMetric ()
 Matrix3x3 GMSHMetric :: Intersect2Metrics (Matrix3x3 *m1[2])
 {
   double lmax = 0.;
-  int im,ic,io;
+  int im=0,ic=0,io=0;
   Vector3 cmax(0.,0,0,0);
   Matrix3x3 res(0.0);
 
@@ -149,7 +149,7 @@ Local_Metric_Of_Attractors ( double X, double Y, double Z,
 
   int i;
   Attractor *a;
-  double u, x1, x2, d;
+  double u, x1, x2, d=0.;
   Vertex v1 (X, Y, Z), v2,metr;
 
   Matrix3x3 myOldMetric (0.,m);
diff --git a/Mesh/Read_Mesh.cpp b/Mesh/Read_Mesh.cpp
index 3117a6d83f..e6c140fdbc 100644
--- a/Mesh/Read_Mesh.cpp
+++ b/Mesh/Read_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: Read_Mesh.cpp,v 1.48 2003-01-23 20:19:22 geuzaine Exp $
+// $Id: Read_Mesh.cpp,v 1.49 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -98,7 +98,7 @@ void Read_Mesh_MSH (Mesh *M, FILE *File_GEO){
   Curve   C , *c , **cc;
   Surface S , *s , **ss;
   Volume  V , *v , **vv;
-  Tree_T *Duplicates ;
+  Tree_T *Duplicates=NULL ;
 
   while (1) {
     do { 
diff --git a/Mesh/SMS.cpp b/Mesh/SMS.cpp
index d9e202bcaf..dbeb77f928 100644
--- a/Mesh/SMS.cpp
+++ b/Mesh/SMS.cpp
@@ -1,4 +1,4 @@
-// $Id: SMS.cpp,v 1.10 2003-01-23 20:19:22 geuzaine Exp $
+// $Id: SMS.cpp,v 1.11 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -139,7 +139,7 @@ void Read_Mesh_SMS (Mesh *m, FILE *in)
   int VertexId1,VertexId2,NbEdgesOnFace,NbFacesOnRegion;
   double x,y,z,u,v;
   List_T *AllEdges,*AllFaces;
-  Vertex *v1,*v2,*v3,*v4;
+  Vertex *v1=NULL,*v2=NULL,*v3=NULL,*v4=NULL;
 
 
   fscanf(in,"%s %d",line,&Dummy);
diff --git a/Mesh/SwapEdge.cpp b/Mesh/SwapEdge.cpp
index 4c0e3f48af..3ea722ee1a 100644
--- a/Mesh/SwapEdge.cpp
+++ b/Mesh/SwapEdge.cpp
@@ -1,4 +1,4 @@
-// $Id: SwapEdge.cpp,v 1.11 2003-01-23 20:19:22 geuzaine Exp $
+// $Id: SwapEdge.cpp,v 1.12 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -143,7 +143,7 @@ bool FindBestPattern (int N, Vertex * Contour[100], Vertex * Ed[2],
 
   old_volume = 0.0;
   worst_tet_old = 1.;
-  int IENT;
+  int IENT = 0;
   for (k = 0; k < List_Nbr (Coquille); k++){
     List_Read (Coquille, k, &s);
     IENT = s->iEnt;
diff --git a/Mesh/Utils.cpp b/Mesh/Utils.cpp
index f692103739..63f1505530 100644
--- a/Mesh/Utils.cpp
+++ b/Mesh/Utils.cpp
@@ -1,4 +1,4 @@
-// $Id: Utils.cpp,v 1.15 2003-02-18 05:50:05 geuzaine Exp $
+// $Id: Utils.cpp,v 1.16 2003-02-25 04:02:51 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -231,7 +231,7 @@ end:
 
 void find_bestuv (Surface * s, double X, double Y,
                   double *U, double *V, double *Z, int N){
-  double d, mina, min, minu, minv, Unew, Vnew;
+  double d, mina, min=0., minu=0., minv=0., Unew, Vnew;
   static int i, j;
   Vertex P;
 
@@ -399,7 +399,7 @@ void XYZtoUV (Surface *s, double X, double Y, double Z, double *U, double *V,
 void XYtoUV (Surface * s, double *X, double *Y,
              double *U, double *V, double *Z, double relax){
 
-  double det, Unew, Vnew, err, mat[2][2], jac[2][2];
+  double det, Unew=0., Vnew=0., err, mat[2][2], jac[2][2];
   int iter;
   Vertex D_u, D_v, P;
   double umin, umax, vmin, vmax;
diff --git a/Numeric/gsl_newt.cpp b/Numeric/gsl_newt.cpp
index 34a5167f36..74e9218c0d 100644
--- a/Numeric/gsl_newt.cpp
+++ b/Numeric/gsl_newt.cpp
@@ -1,4 +1,4 @@
-// $Id: gsl_newt.cpp,v 1.6 2003-02-20 17:02:00 geuzaine Exp $
+// $Id: gsl_newt.cpp,v 1.7 2003-02-25 04:02:52 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -72,7 +72,7 @@ void newt(double x[], int n, int *check, void (*func)(int, double [],double []))
   const gsl_multiroot_fsolver_type *T;
   gsl_multiroot_fsolver *s;
   int status;
-  size_t i, iter = 0;
+  size_t iter = 0;
   struct gsl_dummy p = {};
   gsl_multiroot_function f = {&gslfunc, n, &p};
   gsl_vector *xx = gsl_vector_alloc (n);
-- 
GitLab