From: Michael Wallner Date: Wed, 25 May 2005 16:45:00 +0000 (+0000) Subject: - fix compiler warnings (unused vars & missing includes) X-Git-Tag: RELEASE_0_8_0~19 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=4f5d70d375dac27459a80c1e5271697c1f46c675;p=m6w6%2Fext-http - fix compiler warnings (unused vars & missing includes) --- diff --git a/http_api.c b/http_api.c index 079e451..8ba8259 100644 --- a/http_api.c +++ b/http_api.c @@ -30,6 +30,7 @@ #include "php_http_send_api.h" #ifdef ZEND_ENGINE_2 +# include "zend_exceptions.h" # include "php_http_exception_object.h" #endif diff --git a/http_functions.c b/http_functions.c index 4b611e0..ba2bd56 100644 --- a/http_functions.c +++ b/http_functions.c @@ -980,8 +980,6 @@ PHP_FUNCTION(http_request_method_register) PHP_FUNCTION(http_request_method_unregister) { zval *method; - zend_bool numeric; - unsigned long existing; if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &method)) { RETURN_FALSE; diff --git a/http_message_api.c b/http_message_api.c index 47cd1dd..7f22d17 100644 --- a/http_message_api.c +++ b/http_message_api.c @@ -59,14 +59,14 @@ static void _http_message_headers_cb(const char *http_line, HashTable **headers, // response if (!strncmp(http_line, "HTTP/1.", lenof("HTTP/1."))) { new->type = HTTP_MSG_RESPONSE; - new->info.response.http_version = atof(http_line + lenof("HTTP/")); + new->info.response.http_version = (float) atof(http_line + lenof("HTTP/")); new->info.response.code = atoi(http_line + lenof("HTTP/1.1 ")); } else // request if (!strncmp(http_line + line_length - lenof("HTTP/1.1"), "HTTP/1.", lenof("HTTP/1."))) { const char *method_sep_uri = strchr(http_line, ' '); new->type = HTTP_MSG_REQUEST; - new->info.request.http_version = atof(http_line + line_length - lenof("1.1")); + new->info.request.http_version = (float) atof(http_line + line_length - lenof("1.1")); new->info.request.method = estrndup(http_line, method_sep_uri - http_line); new->info.request.URI = estrndup(method_sep_uri + 1, http_line + line_length - method_sep_uri - 1 - lenof(" HTTP/1.1")); } diff --git a/http_methods.c b/http_methods.c index 4b24935..322836e 100644 --- a/http_methods.c +++ b/http_methods.c @@ -40,6 +40,8 @@ #ifdef ZEND_ENGINE_2 +#include "missing.h" + ZEND_EXTERN_MODULE_GLOBALS(http) /* {{{ HttpResponse */ @@ -629,7 +631,6 @@ PHP_METHOD(HttpMessage, fromString) char *string = NULL; int length = 0; http_message *msg = NULL; - http_message_object obj; if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &string, &length)) { RETURN_NULL(); @@ -889,7 +890,6 @@ PHP_METHOD(HttpMessage, getRequestUri) NO_ARGS; IF_RETVAL_USED { - zval *uri; getObject(http_message_object, obj); if (!HTTP_MSG_TYPE(REQUEST, obj->message)) { @@ -972,7 +972,7 @@ PHP_METHOD(HttpMessage, getHttpVersion) PHP_METHOD(HttpMessage, setHttpVersion) { char v[4]; - zval *zv, *version; + zval *zv; getObject(http_message_object, obj); if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &zv)) { diff --git a/http_response_object.c b/http_response_object.c index 480479d..42416ec 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -27,6 +27,8 @@ #ifdef ZEND_ENGINE_2 +#include "missing.h" + #define http_response_object_declare_default_properties() _http_response_object_declare_default_properties(TSRMLS_C) static inline void _http_response_object_declare_default_properties(TSRMLS_D);