[dia] [warningectomy] mostly char casts
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [dia] [warningectomy] mostly char casts
- Date: Fri, 23 Oct 2009 11:44:29 +0000 (UTC)
commit 492f8eaf18d7f371d12519982fc4dc95c31b049d
Author: Hans Breuer <hans breuer org>
Date: Sat Oct 3 22:45:22 2009 +0200
[warningectomy] mostly char casts
plug-ins/drs/dia-render-script-import.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/drs/dia-render-script-import.c b/plug-ins/drs/dia-render-script-import.c
index 8e93a23..6c88908 100644
--- a/plug-ins/drs/dia-render-script-import.c
+++ b/plug-ins/drs/dia-render-script-import.c
@@ -31,6 +31,8 @@
#include <libxml/tree.h>
+#include "dia-render-script.h"
+
static real
_parse_real (xmlNodePtr node, const char *attrib)
{
@@ -140,7 +142,7 @@ struct _RenderOp {
void *params[6];
};
-xmlNodePtr
+static xmlNodePtr
find_child_named (xmlNodePtr node, const char *name)
{
for (node = node->children; node; node = node->next)
@@ -167,8 +169,8 @@ read_items (xmlNodePtr startnode)
continue;
if (!xmlStrcmp(node->name, (const xmlChar *)"object")) {
xmlChar *sType = xmlGetProp(node, (const xmlChar *)"type");
- const DiaObjectType *ot = object_get_type (sType);
- xmlNodePtr child, props = NULL, render = NULL;
+ const DiaObjectType *ot = object_get_type ((gchar *)sType);
+ xmlNodePtr props = NULL, render = NULL;
props = find_child_named (node, "properties");
render = find_child_named (node, "render");
@@ -204,13 +206,13 @@ read_items (xmlNodePtr startnode)
return items;
}
-/* imports the given SVG file, returns TRUE if successful */
+/* imports the given DRS file, returns TRUE if successful */
gboolean
import_drs (const gchar *filename, DiagramData *dia, void* user_data)
{
GList *item, *items;
xmlDocPtr doc = xmlParseFile(filename);
- xmlNodePtr root, node;
+ xmlNodePtr root = NULL, node;
Layer *active_layer = NULL;
for (node = doc->children; node; node = node->next)
@@ -231,8 +233,8 @@ import_drs (const gchar *filename, DiagramData *dia, void* user_data)
if (name)
xmlFree (name);
- str = xmlGetProp (node, "active");
- if (xmlStrcmp (str, "true")) {
+ str = xmlGetProp (node, (const xmlChar *)"active");
+ if (xmlStrcmp (str, (const xmlChar *)"true")) {
active_layer = layer;
xmlFree (str);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]