diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-25 20:42:17 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-25 20:42:17 +0000 |
commit | 17329e0a13c156e7292784b20a42a4413f44a9a8 (patch) | |
tree | 8f714c5cb8a600222a2e7576380b8a3a3f9c9065 | |
parent | 2ed308e762abfb3e3d8746dff24581831d796056 (diff) | |
download | libdom-17329e0a13c156e7292784b20a42a4413f44a9a8.tar.gz libdom-17329e0a13c156e7292784b20a42a4413f44a9a8.tar.bz2 |
Squash warnings
svn path=/trunk/dom/; revision=6885
-rw-r--r-- | bindings/xml/xmlparser.c | 14 | ||||
-rw-r--r-- | src/core/node.c | 2 | ||||
-rw-r--r-- | src/core/string.c | 15 |
3 files changed, 14 insertions, 17 deletions
diff --git a/bindings/xml/xmlparser.c b/bindings/xml/xmlparser.c index 9e3786f..73fbcd1 100644 --- a/bindings/xml/xmlparser.c +++ b/bindings/xml/xmlparser.c @@ -374,7 +374,7 @@ void xml_parser_end_document(void *ctx) /* Get XML node */ err = dom_node_get_user_data((struct dom_node *) parser->doc, - parser->udkey, (void **) &node); + parser->udkey, (void **) (void *) &node); if (err != DOM_NO_ERR) { parser->msg(DOM_MSG_WARNING, parser->mctx, "Failed finding XML node"); @@ -853,7 +853,7 @@ void xml_parser_add_element_node(dom_xml_parser *parser, /* Append element to parent */ err = dom_node_append_child(parent, (struct dom_node *) el, - (struct dom_node **) &ins_el); + (struct dom_node **) (void *) &ins_el); if (err != DOM_NO_ERR) { parser->msg(DOM_MSG_ERROR, parser->mctx, "Failed attaching element '%s'", @@ -922,7 +922,7 @@ void xml_parser_add_text_node(dom_xml_parser *parser, struct dom_node *parent, /* Append text node to parent */ err = dom_node_append_child(parent, (struct dom_node *) text, - (struct dom_node **) &ins_text); + (struct dom_node **) (void *) &ins_text); if (err != DOM_NO_ERR) { dom_node_unref((struct dom_node *) text); parser->msg(DOM_MSG_ERROR, parser->mctx, @@ -983,7 +983,7 @@ void xml_parser_add_cdata_section(dom_xml_parser *parser, /* Append cdata section to parent */ err = dom_node_append_child(parent, (struct dom_node *) cdata, - (struct dom_node **) &ins_cdata); + (struct dom_node **) (void *) &ins_cdata); if (err != DOM_NO_ERR) { dom_node_unref((struct dom_node *) cdata); parser->msg(DOM_MSG_ERROR, parser->mctx, @@ -1051,7 +1051,7 @@ void xml_parser_add_entity_reference(dom_xml_parser *parser, /* Append entity reference to parent */ err = dom_node_append_child(parent, (struct dom_node *) entity, - (struct dom_node **) &ins_entity); + (struct dom_node **) (void *) &ins_entity); if (err != DOM_NO_ERR) { dom_node_unref((struct dom_node *) entity); parser->msg(DOM_MSG_ERROR, parser->mctx, @@ -1112,7 +1112,7 @@ void xml_parser_add_comment(dom_xml_parser *parser, struct dom_node *parent, /* Append comment to parent */ err = dom_node_append_child(parent, (struct dom_node *) comment, - (struct dom_node **) &ins_comment); + (struct dom_node **) (void *) &ins_comment); if (err != DOM_NO_ERR) { dom_node_unref((struct dom_node *) comment); parser->msg(DOM_MSG_CRITICAL, parser->mctx, @@ -1207,7 +1207,7 @@ void xml_parser_add_document_type(dom_xml_parser *parser, /* Add doctype to document */ err = dom_node_append_child(parent, (struct dom_node *) doctype, - (struct dom_node **) &ins_doctype); + (struct dom_node **) (void *) &ins_doctype); if (err != DOM_NO_ERR) { dom_node_unref((struct dom_node *) doctype); parser->msg(DOM_MSG_CRITICAL, parser->mctx, diff --git a/src/core/node.c b/src/core/node.c index 23a0f80..518d88c 100644 --- a/src/core/node.c +++ b/src/core/node.c @@ -1556,7 +1556,7 @@ dom_exception _dom_node_get_user_data(dom_node_internal *node, bool _dom_node_permitted_child(const dom_node_internal *parent, const dom_node_internal *child) { - bool valid; + bool valid = false; /* See DOM3Core $1.1.1 for details */ diff --git a/src/core/string.c b/src/core/string.c index 3d30e3f..806531a 100644 --- a/src/core/string.c +++ b/src/core/string.c @@ -248,7 +248,7 @@ uint32_t dom_string_rindex(struct dom_string *str, uint32_t chr) { const uint8_t *s; size_t clen, slen; - uint32_t c, index; + uint32_t c, coff, index; parserutils_error err; if (str == NULL) @@ -261,9 +261,9 @@ uint32_t dom_string_rindex(struct dom_string *str, uint32_t chr) while (slen > 0) { err = parserutils_charset_utf8_prev(s, slen, - (uint32_t *) &clen); + (uint32_t *) &coff); if (err == PARSERUTILS_OK) { - err = parserutils_charset_utf8_to_ucs4(s + clen, + err = parserutils_charset_utf8_to_ucs4(s + coff, slen - clen, &c, &clen); } @@ -372,7 +372,7 @@ dom_exception dom_string_substr(struct dom_string *str, { const uint8_t *s = str->ptr; size_t slen = str->len; - size_t b1, b2; + uint32_t b1, b2; parserutils_error err; /* Initialise the byte index of the start to 0 */ @@ -382,8 +382,7 @@ dom_exception dom_string_substr(struct dom_string *str, /* Calculate the byte index of the start */ while (i1 > 0) { - err = parserutils_charset_utf8_next(s, slen - b1, b1, - (uint32_t *) &b1); + err = parserutils_charset_utf8_next(s, slen - b1, b1, &b1); if (err != PARSERUTILS_OK) { return DOM_NO_MEM_ERR; } @@ -396,9 +395,7 @@ dom_exception dom_string_substr(struct dom_string *str, /* Calculate the byte index of the end */ while (i2 > 0) { - err = parserutils_charset_utf8_next(s, slen - b2, b2, - (uint32_t *) &b2); - + err = parserutils_charset_utf8_next(s, slen - b2, b2, &b2); if (err != PARSERUTILS_OK) { return DOM_NO_MEM_ERR; } |