[gnumeric] Compilation: fix warnings (about real problems).



commit 4845429666fe0adce0775f4d720a10a62b325b4f
Author: Morten Welinder <terra gnome org>
Date:   Wed Sep 15 09:15:27 2010 -0400

    Compilation: fix warnings (about real problems).

 plugins/openoffice/ChangeLog         |    5 +++++
 plugins/openoffice/openoffice-read.c |   10 +++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index a61307d..1d5903a 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-15  Morten Welinder  <terra gnome org>
+
+	* openoffice-read.c (od_draw_control_start): Fix UMR.
+	(odf_config_item): Fix type confusion.
+
 2010-09-13  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* openoffice-read.c (opendoc_content_dtd): text:p can
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index b0e35af..a88a0cb 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -4708,7 +4708,7 @@ static void
 od_draw_control_start (GsfXMLIn *xin, xmlChar const **attrs)
 {
 	OOParseState *state = (OOParseState *)xin->user_state;
-	char const *name;
+	char const *name = NULL;
 
 	od_draw_frame_start (xin, attrs);
 
@@ -6773,10 +6773,14 @@ odf_config_item (GsfXMLIn *xin, xmlChar const **attrs)
 	state->settings.config_item_name = NULL;
 	state->settings.type = G_TYPE_INVALID;
 	
-	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
+	for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
+		int i;
+
 		if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_CONFIG, "name"))
 			state->settings.config_item_name = g_strdup (CXML2C (attrs[1]));
-		else if (oo_attr_enum (xin, attrs, OO_NS_CONFIG, "type", config_types, &state->settings.type));
+		else if (oo_attr_enum (xin, attrs, OO_NS_CONFIG, "type", config_types, &i))
+			state->settings.type = i;
+	}
 }
 
 static void



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