From: Paul Eggert Date: Mon, 7 Feb 2011 06:15:32 +0000 (-0800) Subject: * xml.c: conform to C89 pointer rules X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~979 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c45e52762bee7033872fbc34f3dc3a343c77855d;p=emacs.git * xml.c: conform to C89 pointer rules --- diff --git a/src/ChangeLog b/src/ChangeLog index b10f8fab1cc..62316385940 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -28,6 +28,7 @@ * indent.c (compute_motion): Likewise. * xfont.c (xfont_decode_coding_xlfd): Likewise. * ralloc.c (resize_bloc): Likewise. + * xml.c (make_dom, parse_region): Likewise. * character.c (strwidth): Make its argument const char *, not const unsigned char *, since more callers prefer it that way. All callers changed. diff --git a/src/xml.c b/src/xml.c index 16907d4b44a..12ef14e6b9f 100644 --- a/src/xml.c +++ b/src/xml.c @@ -32,7 +32,7 @@ Lisp_Object make_dom (xmlNode *node) { if (node->type == XML_ELEMENT_NODE) { - Lisp_Object result = Fcons (intern (node->name), Qnil); + Lisp_Object result = Fcons (intern ((char *) node->name), Qnil); xmlNode *child; xmlAttr *property; Lisp_Object plist = Qnil; @@ -44,8 +44,9 @@ Lisp_Object make_dom (xmlNode *node) if (property->children && property->children->content) { - plist = Fcons (Fcons (intern (property->name), - build_string (property->children->content)), + char *content = (char *) property->children->content; + plist = Fcons (Fcons (intern ((char *) property->name), + build_string (content)), plist); } property = property->next; @@ -65,7 +66,7 @@ Lisp_Object make_dom (xmlNode *node) else if (node->type == XML_TEXT_NODE || node->type == XML_CDATA_SECTION_NODE) { if (node->content) - return build_string (node->content); + return build_string ((char *) node->content); else return Qnil; } @@ -102,13 +103,13 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html bytes = CHAR_TO_BYTE (iend) - CHAR_TO_BYTE (istart); if (htmlp) - doc = htmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), + doc = htmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), bytes, burl, "utf-8", HTML_PARSE_RECOVER|HTML_PARSE_NONET| HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR| HTML_PARSE_NOBLANKS); else - doc = xmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), + doc = xmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), bytes, burl, "utf-8", XML_PARSE_NONET|XML_PARSE_NOWARNING| XML_PARSE_NOERROR);