[Genabel-commits] r1387 - in pkg: ProbABEL/src filevector/fvlib

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 12 22:36:31 CET 2013


Author: mkooyman
Date: 2013-11-12 22:36:30 +0100 (Tue, 12 Nov 2013)
New Revision: 1387

Modified:
   pkg/ProbABEL/src/coxfit2.c
   pkg/ProbABEL/src/data.cpp
   pkg/filevector/fvlib/FilteredMatrix.cpp
Log:
Minor fixes for errors I found with LLVM clang scan-build 4.2
-FilteredMatrix.cpp
Memory allocated by 'new[]' should be deallocated by 'delete[]', not 'delete'
-coxfit2.c
-Value stored to 'j' is never read 
data.cpp
-Value stored to 'col' is never read



Modified: pkg/ProbABEL/src/coxfit2.c
===================================================================
--- pkg/ProbABEL/src/coxfit2.c	2013-11-12 15:56:53 UTC (rev 1386)
+++ pkg/ProbABEL/src/coxfit2.c	2013-11-12 21:36:30 UTC (rev 1387)
@@ -439,7 +439,6 @@
             loglik[1] = newlk;
             chsolve2(imat, nvar, u);
 
-            j = 0;
             for (i = 0; i < nvar; i++)
             {
                 beta[i] = newbeta[i];

Modified: pkg/ProbABEL/src/data.cpp
===================================================================
--- pkg/ProbABEL/src/data.cpp	2013-11-12 15:56:53 UTC (rev 1386)
+++ pkg/ProbABEL/src/data.cpp	2013-11-12 21:36:30 UTC (rev 1387)
@@ -211,7 +211,6 @@
                 myfile.close();
                 exit(1);
             }
-            col = 0;
             row++;
         }
         myfile.close();

Modified: pkg/filevector/fvlib/FilteredMatrix.cpp
===================================================================
--- pkg/filevector/fvlib/FilteredMatrix.cpp	2013-11-12 15:56:53 UTC (rev 1386)
+++ pkg/filevector/fvlib/FilteredMatrix.cpp	2013-11-12 21:36:30 UTC (rev 1387)
@@ -132,7 +132,7 @@
 
     filterIdxList(obsIndexes, this->getNumObservations(), recodedColIndexes, filteredToRealColIdx);
     filterIdxList(varIndexes, nvars, recodedRowIndexes, filteredToRealRowIdx);
-    delete obsIndexes;
+    delete[] obsIndexes;
 }
 
 void FilteredMatrix::saveObservationsAs( string newFilename, unsigned long nobss, unsigned long * obsIndexes) {



More information about the Genabel-commits mailing list