- fix compiler warnings (unused vars & missing includes)
authorMichael Wallner <mike@php.net>
Wed, 25 May 2005 16:45:00 +0000 (16:45 +0000)
committerMichael Wallner <mike@php.net>
Wed, 25 May 2005 16:45:00 +0000 (16:45 +0000)
http_api.c
http_functions.c
http_message_api.c
http_methods.c
http_response_object.c

index 079e45117d98efa0677a9d0c0adf8033d92cfe06..8ba8259b56dcee449c9cf5c4dbce5bb5e3d20dd8 100644 (file)
@@ -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
 
index 4b611e037d964ee7122aaa970de514073b5418c9..ba2bd56135717d73c50e2ad40693e5179f29e5cd 100644 (file)
@@ -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;
index 47cd1ddd2bf28d3b5d3e33fa28338f6e944d7f7d..7f22d17095d1a5afb90da96969edc411914e2e73 100644 (file)
@@ -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"));
        }
index 4b2493586fba76569483524f74a6ed48956508c6..322836e53685c5fd8334cca47d47df8ce3bc491d 100644 (file)
@@ -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)) {
index 480479d973ab0e4e596898878d786d760c668820..42416ecf6e91667e026098dc01bcf348fd7106cd 100644 (file)
@@ -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);