com php-src: fix warnings: ext/simplexml/simplexml.c

From: Date: Fri, 30 Jan 2015 20:36:23 +0000
Subject: com php-src: fix warnings: ext/simplexml/simplexml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84474@lists.php.net to get a copy of this message
Commit: 960d103d63f3e9e690853b0a07b82195d0f0cfbf Author: Michael Wallner <mike@php.net> Fri, 30 Jan 2015 21:36:23 +0100 Parents: 330d158e937334afed75e6981efed7a3f6c05043 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=960d103d63f3e9e690853b0a07b82195d0f0cfbf Log: fix warnings Changed paths: M ext/simplexml/simplexml.c Diff: diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 9618281..ceba129 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -789,7 +789,7 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend } } if (exists && check_empty == 1 && - (!attr->children || !attr->children->content || !attr->children->content[0] || !xmlStrcmp(attr->children->content, "0")) ) { + (!attr->children || !attr->children->content || !attr->children->content[0] || !xmlStrcmp(attr->children->content, (const xmlChar *) "0")) ) { /* Attribute with no content in it's text node */ exists = 0; } @@ -817,7 +817,7 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend exists = 1; if (check_empty == 1 && (!node->children || (node->children->type == XML_TEXT_NODE && !node->children->next && - (!node->children->content || !node->children->content[0] || !xmlStrcmp(node->children->content, "0")))) ) { + (!node->children->content || !node->children->content[0] || !xmlStrcmp(node->children->content, (const xmlChar *) "0")))) ) { exists = 0; } } @@ -1388,7 +1388,7 @@ SXE_METHOD(asXML) if (node) { if (node->parent && (XML_DOCUMENT_NODE == node->parent->type)) { - xmlDocDumpMemoryEnc((xmlDocPtr) sxe->document->ptr, &strval, &strval_len, ((xmlDocPtr) sxe->document->ptr)->encoding); + xmlDocDumpMemoryEnc((xmlDocPtr) sxe->document->ptr, &strval, &strval_len, (const char *) ((xmlDocPtr) sxe->document->ptr)->encoding); RETVAL_STRINGL((char *)strval, strval_len); xmlFree(strval); } else { @@ -1399,7 +1399,7 @@ SXE_METHOD(asXML) RETURN_FALSE; } - xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, ((xmlDocPtr) sxe->document->ptr)->encoding); + xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, (const char *) ((xmlDocPtr) sxe->document->ptr)->encoding); xmlOutputBufferFlush(outbuf); #ifdef LIBXML2_NEW_BUFFER RETVAL_STRINGL((char *)xmlOutputBufferGetContent(outbuf), xmlOutputBufferGetSize(outbuf));

« previous php.cvs (#84474) next »