diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-01 00:30:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-01 00:30:08 +0300 |
commit | f80240bc068a2ece54fd629fd90e09912415b27c (patch) | |
tree | d0b4c695bfa618a93e3436980e12c6f794230b77 /saedit/xml.c | |
parent | 36e5c2a02596020c0f261b0d8222e254009cb040 (diff) | |
download | tools-f80240bc068a2ece54fd629fd90e09912415b27c.tar.gz tools-f80240bc068a2ece54fd629fd90e09912415b27c.tar.bz2 tools-f80240bc068a2ece54fd629fd90e09912415b27c.tar.xz tools-f80240bc068a2ece54fd629fd90e09912415b27c.zip |
SAE: Add make script with additional warning flags.
Fix simple code issues.
Diffstat (limited to 'saedit/xml.c')
-rw-r--r-- | saedit/xml.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/saedit/xml.c b/saedit/xml.c index 7cf0968..6ead8fe 100644 --- a/saedit/xml.c +++ b/saedit/xml.c @@ -20,7 +20,7 @@ gchar** xml_attr_new(const gchar *name, const gchar *value) { gchar* xml_node_get_attr_value(const XMLNode *node, const gchar *attr_name) { gchar **attr = node->attributes; - int i; + guint i; for (i = 0; i < g_strv_length(attr); i += 2) if (g_str_equal(attr[i], attr_name)) return attr[i + 1]; @@ -144,11 +144,11 @@ static void _start_root_element_cb ( GMarkupParseContext *context, GArray *attributes = g_array_new (TRUE, TRUE, sizeof (gchar *)); while (*attribute_names != NULL && *attribute_values != NULL) { - gchar *p; - p = g_strdup (*attribute_names++); - g_array_append_val (attributes, p); - p = g_strdup (*attribute_values++); - g_array_append_val (attributes, p); + gchar *p2; + p2 = g_strdup (*attribute_names++); + g_array_append_val (attributes, p2); + p2 = g_strdup (*attribute_values++); + g_array_append_val (attributes, p2); } p->attributes = (gchar **) g_array_free (attributes, FALSE); @@ -181,11 +181,11 @@ static void _start_element_cb ( GMarkupParseContext *context, GArray *attributes = g_array_new (TRUE, TRUE, sizeof (gchar *)); while (*attribute_names != NULL && *attribute_values != NULL) { - gchar *p; - p = g_strdup (*attribute_names++); - g_array_append_val (attributes, p); - p = g_strdup (*attribute_values++); - g_array_append_val (attributes, p); + gchar *p2; + p2 = g_strdup (*attribute_names++); + g_array_append_val (attributes, p2); + p2 = g_strdup (*attribute_values++); + g_array_append_val (attributes, p2); } p->attributes = (gchar **)g_array_free (attributes, FALSE); @@ -266,7 +266,7 @@ XMLNode *xml_parse_file (const gchar *filename) { GMarkupParseContext *context; XMLNode *node; - const static GMarkupParser root_parser = { + static const GMarkupParser root_parser = { _start_root_element_cb, _end_element_cb, _text_cb, @@ -313,7 +313,7 @@ XMLNode *xml_parse_buffer (const gchar *buffer, GError **error) { GMarkupParseContext *context; XMLNode *node; - const static GMarkupParser root_parser = { + static const GMarkupParser root_parser = { _start_root_element_cb, _end_element_cb, _text_cb, |