From: Ilia Alshanetsky Date: Thu, 3 Feb 2011 13:33:10 +0000 (+0000) Subject: Fixed compiler warnings caused by var re-declaration X-Git-Tag: php-5.4.0alpha1~191^2~272 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a23458c8edf6fa8db77f9f8f2cdf85576ea92ba;p=php Fixed compiler warnings caused by var re-declaration --- diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 476983cf8a..c875f5a0ac 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2811,18 +2811,18 @@ PHP_METHOD(SoapClient, __call) } if (options) { - HashTable *ht = Z_ARRVAL_P(options); - if (zend_hash_find(ht, "location", sizeof("location"), (void**)&tmp) == SUCCESS && + HashTable *hto = Z_ARRVAL_P(options); + if (zend_hash_find(hto, "location", sizeof("location"), (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING) { location = Z_STRVAL_PP(tmp); } - if (zend_hash_find(ht, "soapaction", sizeof("soapaction"), (void**)&tmp) == SUCCESS && + if (zend_hash_find(hto, "soapaction", sizeof("soapaction"), (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING) { soap_action = Z_STRVAL_PP(tmp); } - if (zend_hash_find(ht, "uri", sizeof("uri"), (void**)&tmp) == SUCCESS && + if (zend_hash_find(hto, "uri", sizeof("uri"), (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING) { uri = Z_STRVAL_PP(tmp); } @@ -2850,10 +2850,10 @@ PHP_METHOD(SoapClient, __call) HashTable *default_headers = Z_ARRVAL_P(*tmp); if (soap_headers) { if (!free_soap_headers) { - HashTable *tmp = emalloc(sizeof(HashTable)); - zend_hash_init(tmp, 0, NULL, ZVAL_PTR_DTOR, 0); - zend_hash_copy(tmp, soap_headers, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *)); - soap_headers = tmp; + HashTable *t = emalloc(sizeof(HashTable)); + zend_hash_init(t, 0, NULL, ZVAL_PTR_DTOR, 0); + zend_hash_copy(t, soap_headers, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *)); + soap_headers = t; free_soap_headers = 1; } zend_hash_internal_pointer_reset(default_headers); @@ -3522,7 +3522,6 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c while (trav != NULL) { if (trav->type == XML_ELEMENT_NODE) { xmlNodePtr hdr_func = trav; - xmlAttrPtr attr; int mustUnderstand = 0; if (*version == SOAP_1_1) { @@ -3768,7 +3767,6 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function if (headers && zend_hash_find(prop, "headerfault", sizeof("headerfault"), (void**)&tmp) == SUCCESS) { - xmlNodePtr head; encodePtr hdr_enc = NULL; int hdr_use = SOAP_LITERAL; zval *hdr_ret = *tmp; @@ -3779,7 +3777,6 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function if (Z_TYPE_P(hdr_ret) == IS_OBJECT && instanceof_function(Z_OBJCE_P(hdr_ret), soap_header_class_entry TSRMLS_CC)) { HashTable* ht = Z_OBJPROP_P(hdr_ret); - zval **tmp; sdlSoapBindingFunctionHeaderPtr *hdr; smart_str key = {0}; @@ -3968,7 +3965,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function } } else { if (sparam->element) { - xmlNsPtr ns = encode_add_ns(x, sparam->element->namens); + ns = encode_add_ns(x, sparam->element->namens); xmlNodeSetName(x, BAD_CAST(sparam->element->name)); xmlSetNs(x, ns); }