[gnumeric] Fix "Assigned value is garbage or undefined".



commit 1e03d0418fe8f2d31d6e30d0c6c2c430064ee05e
Author: J.H.M. Dassen (Ray) <jdassen debian org>
Date:   Thu Sep 16 17:16:59 2010 +0200

    Fix "Assigned value is garbage or undefined".
    
    "type" was not initialised on declaration and did not get set for "BV"
    (binary value) bounds.

 plugins/mps/mps.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/mps/mps.c b/plugins/mps/mps.c
index 1b193bd..891aaad 100644
--- a/plugins/mps/mps.c
+++ b/plugins/mps/mps.c
@@ -407,9 +407,10 @@ mps_parse_bounds (MpsState *state)
 			 strcmp (bt, "PL") == 0 ||
 			 strcmp (bt, "MI") == 0)
 			continue;
-		else if (strcmp (bt, "BV") == 0)
+		else if (strcmp (bt, "BV") == 0) {
+			type = GNM_SOLVER_BOOLEAN;
 			integer = TRUE;
-		else {
+		} else {
 			mps_mark_error (state,
 					_("Invalid bounds type %s"),
 					type);



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