[goffice] Linear Solver: fix return value.



commit e7cecab934f1fce09aeadce921bb4430ebc5bb99
Author: Morten Welinder <terra gnome org>
Date:   Sat Feb 7 17:39:35 2015 -0500

    Linear Solver: fix return value.
    
    We were returning an uninitialized value in the no-error case.  The
    compiler should have been screaming about that, but no such luck.

 NEWS                         |    3 +++
 goffice/math/go-regression.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index a8860a8..7339b12 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 goffice 0.10.21:
 
+Morten:
+       * Fix problem with linear solver.
+
 --------------------------------------------------------------------------
 goffice 0.10.20:
 
diff --git a/goffice/math/go-regression.c b/goffice/math/go-regression.c
index 44b731f..cbec9df 100644
--- a/goffice/math/go-regression.c
+++ b/goffice/math/go-regression.c
@@ -346,7 +346,7 @@ GORegressionResult
 SUFFIX(go_linear_solve_multiple) (CONSTMATRIX A, MATRIX B, int n, int bn)
 {
        void *state;
-       GORegressionResult regres;
+       GORegressionResult regres = GO_REG_ok;
        SUFFIX(GOQuadMatrix) *qA;
        const SUFFIX(GOQuadMatrix) *R;
        SUFFIX(GOQuadQR) *qr;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]