steinm Tue Mar 20 08:20:43 2001 EDT
Modified files:
/php4/ext/domxml php_domxml.c
Log:
- fixed lot of compiler warnings
Index: php4/ext/domxml/php_domxml.c
diff -u php4/ext/domxml/php_domxml.c:1.29 php4/ext/domxml/php_domxml.c:1.30
--- php4/ext/domxml/php_domxml.c:1.29 Tue Mar 20 07:01:13 2001
+++ php4/ext/domxml/php_domxml.c Tue Mar 20 08:20:42 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_domxml.c,v 1.29 2001/03/20 15:01:13 steinm Exp $ */
+/* $Id: php_domxml.c,v 1.30 2001/03/20 16:20:42 steinm Exp $ */
#include "php.h"
@@ -968,7 +968,7 @@
PHP_FUNCTION(domxml_node_name)
{
zval *id;
- xmlNode *n, *first;
+ xmlNode *n;
const char *str = NULL;
id = getThis();
@@ -1173,7 +1173,6 @@
{
zval *id;
xmlNode *nodep;
- int ret;
id = getThis();
if(NULL == (nodep = php_dom_get_object(id, le_domxmlnodep, 0)))
@@ -1193,7 +1192,6 @@
{
zval *id;
xmlNode *nodep;
- int ret;
id = getThis();
if(NULL == (nodep = php_dom_get_object(id, le_domxmlnodep, 0)))
@@ -1260,9 +1258,8 @@
Returns list of children nodes */
PHP_FUNCTION(domxml_node_children)
{
- zval *id, **tmp;
+ zval *id;
xmlNode *nodep, *last;
- xmlDoc *docp;
int ret;
id = getThis();
@@ -1296,9 +1293,8 @@
Deletes node */
PHP_FUNCTION(domxml_node_unlink_node)
{
- zval *id, **tmp;
- xmlNode *nodep, *last;
- int ret;
+ zval *id;
+ xmlNode *nodep;
id = getThis();
nodep = php_dom_get_object(id, le_domxmlnodep, 0);
@@ -1393,7 +1389,7 @@
Sets name of a node */
PHP_FUNCTION(domxml_node_set_name)
{
- zval *id, *name, **tmp;
+ zval *id, *name;
xmlNode *nodep;
if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &name) == FAILURE) {
@@ -1415,7 +1411,7 @@
Returns list of attributes of node */
PHP_FUNCTION(domxml_node_attributes)
{
- zval *id, **tmp;
+ zval *id;
xmlNode *nodep;
#ifdef oldstyle_for_libxml_1_8_7
xmlAttr *attr;
@@ -1449,7 +1445,7 @@
Adds child node to parent node */
PHP_FUNCTION(domxml_node_new_child)
{
- zval *id, *name, *content, **tmp, *rv;
+ zval *id, *name, *content, *rv;
xmlNodePtr child, nodep;
int ret;
@@ -1479,7 +1475,7 @@
Set content of a node */
PHP_FUNCTION(domxml_node_set_content)
{
- zval *id, *content, **tmp;
+ zval *id, *content;
xmlNode *nodep;
if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &content) == FAILURE) {
@@ -1531,9 +1527,8 @@
Returns tag name of element node */
PHP_FUNCTION(domxml_elem_tagname)
{
- zval *id, *arg1, **tmp;
+ zval *id;
xmlNode *nodep;
- char *value;
id = getThis();
nodep = php_dom_get_object(id, le_domxmlelementp, 0);
@@ -1604,7 +1599,6 @@
{
zval *id, *arg1;
xmlNode *nodep;
- char *value;
if ((ZEND_NUM_ARGS() == 1) && getParameters(ht, 1, &arg1) == SUCCESS) {
id = getThis();
@@ -1639,7 +1633,7 @@
/* FIXME: not implemented */
- RETURN_STRING(value, 1);
+ RETURN_TRUE;
}
/* }}} */
@@ -1671,7 +1665,6 @@
{
zval *id, *arg1;
xmlNode *nodep;
- char *value;
if ((ZEND_NUM_ARGS() == 1) && getParameters(ht, 1, &arg1) == SUCCESS) {
id = getThis();
@@ -1712,7 +1705,7 @@
Returns DomDocumentType */
PHP_FUNCTION(domxml_doc_doctype)
{
- zval *arg, *id, *rv;
+ zval *id, *rv;
xmlDtdPtr dtd;
xmlDocPtr docp;
int ret;
@@ -1733,10 +1726,8 @@
Returns DomeDOMImplementation */
PHP_FUNCTION(domxml_doc_implementation)
{
- zval *arg, *id, *rv;
- xmlNode *node;
+ zval *id;
xmlDocPtr docp;
- int ret;
id = getThis();
if(NULL == (docp = php_dom_get_object(id, le_domxmldocp, 0))) {
@@ -1877,7 +1868,7 @@
PHP_FUNCTION(domxml_doc_create_attribute)
{
zval *arg1, *arg2, *id, *rv;
- xmlNode *node;
+ xmlAttrPtr node;
xmlDocPtr docp;
int ret;
@@ -1898,7 +1889,7 @@
}
node->doc = docp;
- rv = php_domobject_new(node, &ret);
+ rv = php_domobject_new((xmlNodePtr) node, &ret);
SEPARATE_ZVAL(&rv);
*return_value = *rv;
}
@@ -1962,7 +1953,7 @@
Dumps document into string */
PHP_FUNCTION(domxml_dumpmem)
{
- zval *id, **tmp;
+ zval *id;
xmlDoc *docp;
xmlChar *mem;
int size;
@@ -2054,7 +2045,7 @@
Add string tocontent of a node */
PHP_FUNCTION(domxml_node_text_concat)
{
- zval *id, *content, **tmp;
+ zval *id, *content;
xmlNode *nodep;
if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &content) == FAILURE) {
@@ -2079,7 +2070,6 @@
zval *id, *name, *rv;
xmlDoc *docp;
xmlNode *nodep;
- xmlChar *content;
int ret;
if (ZEND_NUM_ARGS() == 1 || getParameters(ht, 1, &name)) {
@@ -2167,7 +2157,6 @@
Returns list of children nodes */
static int node_attributes(zval **attributes, xmlNode *nodep)
{
- zval *children;
xmlAttr *attr;
int count = 0;
@@ -2188,14 +2177,14 @@
while(attr) {
zval *pattr;
- int n, ret;
+ int ret;
pattr = php_domobject_new((xmlNodePtr) attr, &ret);
// if(0 <= (n = node_children(&children, attr->children))) {
// zend_hash_update(pattr->value.obj.properties, "children",
sizeof("children"), (void *) &children, sizeof(zval *), NULL);
// }
- add_property_string(pattr, "name", attr->name, 1);
- add_property_string(pattr, "value", xmlNodeGetContent(attr), 1);
+ add_property_string(pattr, "name", (char *) (attr->name), 1);
+ add_property_string(pattr, "value", xmlNodeGetContent((xmlNodePtr)
+attr), 1);
zend_hash_next_index_insert((*attributes)->value.ht, &pattr,
sizeof(zval *), NULL);
attr = attr->next;
count++;
@@ -2226,7 +2215,6 @@
while(last) {
zval *child;
- xmlChar *content;
int ret;
child = php_domobject_new(last, &ret);
@@ -2287,8 +2275,6 @@
Thanks to Paul DuBois for pointing me at this.
*/
if(0 <= node_children(&children, root)) {
- int i, count;
- HashTable *lht;
zend_hash_update(return_value->value.obj.properties, "children",
sizeof("children"), (void *) &children, sizeof(zval *), NULL);
}
@@ -2403,7 +2389,6 @@
for(i = 0;i < nodesetp->nodeNr;i++) {
xmlNodePtr node = nodesetp->nodeTab[i];
zval *child;
- xmlChar *content;
int retnode;
/* construct a node object */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]