[gnumeric] Compilation: warning fix.



commit 790ff6d424ffa3ef2112909f7e21d92b35dcd6e0
Author: Morten Welinder <terra gnome org>
Date:   Tue May 3 13:03:01 2011 -0400

    Compilation: warning fix.

 src/value.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/value.c b/src/value.c
index 911d8a9..5fdbfdb 100644
--- a/src/value.c
+++ b/src/value.c
@@ -469,7 +469,11 @@ value_new_from_string (GnmValueType t, char const *str, GOFormat *sf,
 {
 	GnmValue *res = NULL;
 
-	switch (t) {
+	/*
+	 * We need the following cast to avoid a warning from gcc over
+	 * VALUE_INTEGER (which is not in GnmValueType).
+	 */
+	switch ((guint8)t) {
 	case VALUE_EMPTY:
 		res = value_new_empty ();
 		break;



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