[gnumeric] Do not compare signed and unsigned.



commit 357e4ad82c34da56c432df74774b1dd948529d0d
Author: Jean Brefort <jean brefort normalesup org>
Date:   Tue Aug 24 17:19:23 2010 +0200

    Do not compare signed and unsigned.

 plugins/fn-tsa/ChangeLog   |    4 ++++
 plugins/fn-tsa/functions.c |    6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plugins/fn-tsa/ChangeLog b/plugins/fn-tsa/ChangeLog
index 94d290a..fbb195c 100644
--- a/plugins/fn-tsa/ChangeLog
+++ b/plugins/fn-tsa/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-24  Jean Brefort  <jean brefort normalesup org>
+
+	* functions.c (gnumeric_interpolation): do not compare signed and unsigned.
+
 2010-08-22 Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* functions.c (help_interpolation): correct the description
diff --git a/plugins/fn-tsa/functions.c b/plugins/fn-tsa/functions.c
index f4642f2..4ae678a 100644
--- a/plugins/fn-tsa/functions.c
+++ b/plugins/fn-tsa/functions.c
@@ -398,7 +398,7 @@ gnumeric_interpolation (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 	CollectFlags flags;
 	GnmEvalPos const * const ep = ei->pos;
 	GnmValue const * const PtInterpolation = argv[2];
-	unsigned r, i;
+	int r, i;
 	GSList *missing0 = NULL;
 	GSList *missing1 = NULL;
 	GSList *missing2 = NULL;
@@ -509,8 +509,8 @@ gnumeric_interpolation (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 		missing0 = missing2;
 		if (fres) {
 			i = 0;
-			for( r = 0 ; r < n2; ++r)
-				if (missing0 && r == GPOINTER_TO_UINT (missing0->data)) {
+			for (r = 0 ; r < n2; ++r)
+				if (missing0 && r == GPOINTER_TO_INT (missing0->data)) {
 					missing0 = missing0->next;
 					res->v_array.vals[0][r] = value_new_error_std (ei->pos, GNM_ERROR_VALUE);
 				} else



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