]> henry.ined.fr Git - .git/commitdiff
Summary: valgrind bug fixed by initializing to zero DummyV as well as Tage
authorN. Brouard <brouard@ined.fr>
Wed, 27 Jul 2022 17:40:48 +0000 (17:40 +0000)
committerN. Brouard <brouard@ined.fr>
Wed, 27 Jul 2022 17:40:48 +0000 (17:40 +0000)
src/imach.c

index 6e6928e22d44f3f5a60caaabba3e720258bf6c01..39db19e53a038c605fcaa1f08347d91e263ffcd8 100644 (file)
@@ -1,6 +1,9 @@
 /* $Id$
   $State$
   $Log$
+  Revision 1.327  2022/07/27 14:47:35  brouard
+  Summary: Still a problem for one-step probabilities in case of quantitative variables
+
   Revision 1.326  2022/07/26 17:33:55  brouard
   Summary: some test with nres=1
 
@@ -9597,6 +9600,10 @@ int readdata(char datafile[], int firstobs, int lastobs, int *imax)
 
   DummyV=ivector(1,NCOVMAX); /* 1 to 3 */
   FixedV=ivector(1,NCOVMAX); /* 1 to 3 */
+  for(v=1;v<NCOVMAX;v++){
+    DummyV[v]=0;
+    FixedV[v]=0;
+  }
 
   for(v=1; v <=ncovcol;v++){
     DummyV[v]=0;
@@ -11999,7 +12006,9 @@ Please run with mle=-1 to get a correct covariance matrix.\n",optionfile,numline
   Tage=ivector(1,NCOVMAX); /* Gives the covariate id of covariates associated with age: V2 + V1 + age*V4 + V3*age
                         4 covariates (3 plus signs)
                         Tage[1=V3*age]= 4; Tage[2=age*V4] = 3
-                     */  
+                          */  
+  for(i=1;i<NCOVMAX;i++)
+    Tage[i]=0;
   Tmodelind=ivector(1,NCOVMAX);/** gives the k model position of an
                                * individual dummy, fixed or varying:
                                * Tmodelind[Tvaraff[3]]=9,Tvaraff[1]@9={4,