header cleanups; fix IDE warnings
authorMichael Wallner <mike@php.net>
Tue, 10 Jan 2012 14:27:19 +0000 (14:27 +0000)
committerMichael Wallner <mike@php.net>
Tue, 10 Jan 2012 14:27:19 +0000 (14:27 +0000)
21 files changed:
php_http.c
php_http.h
php_http_api.h
php_http_cookie.c
php_http_curl.c
php_http_env_response.c
php_http_filter.c
php_http_message.c
php_http_message_body.c
php_http_misc.c
php_http_negotiate.c
php_http_neon.c
php_http_params.c
php_http_property_proxy.c
php_http_querystring.c
php_http_request.c
php_http_request_datashare.c
php_http_request_factory.c
php_http_request_pool.c
php_http_url.c
php_http_url.h

index cd95f48d1af30898bdea133b940514b0190cf964..1fc0513d3532c4926a4adabd65aee2302688fe04 100644 (file)
@@ -13,7 +13,6 @@
 #include "php_http_api.h"
 
 #include <php_ini.h>
 #include "php_http_api.h"
 
 #include <php_ini.h>
-#include <ext/standard/php_string.h>
 #include <ext/standard/info.h>
 
 #include <zlib.h>
 #include <ext/standard/info.h>
 
 #include <zlib.h>
index 94ed04e92afd9df72607be3b1b4bdcf684f65d8b..e8d5e40fb235e02458a16553125ceaf165626e96 100644 (file)
@@ -20,15 +20,6 @@ extern zend_module_entry http_module_entry;
 
 extern int http_module_number;
 
 
 extern int http_module_number;
 
-#if PHP_DEBUG
-#      define _DPF_STR 0
-#      define _DPF_IN  1
-#      define _DPF_OUT 2
-extern void _dpf(int type, const char *data, size_t length);
-#else
-#      define _dpf(t,s,l);
-#endif
-
 #endif /* PHP_EXT_HTTP_H */
 
 /*
 #endif /* PHP_EXT_HTTP_H */
 
 /*
index 5cf64c989c89093a845cb81e43d1e04c78cc199c..47b686994070f791a0ef22c081e83a471a2d577d 100644 (file)
 #include "config.h"
 #endif
 
 #include "config.h"
 #endif
 
-#include <php.h>
 #include <php_config.h>
 #include <php_config.h>
+#include <php.h>
 #include <SAPI.h>
 #include <SAPI.h>
+
+#include <ext/standard/php_string.h>
+#include <ext/spl/spl_iterators.h>
+#include <ext/date/php_date.h>
+
 #include <zend_interfaces.h>
 
 #if defined(PHP_WIN32)
 #include <zend_interfaces.h>
 
 #if defined(PHP_WIN32)
@@ -61,6 +66,8 @@ typedef int STATUS;
 #define PHP_HTTP_IS_CTYPE(type, c) is##type((int) (unsigned char) (c))
 #define PHP_HTTP_TO_CTYPE(type, c) to##type((int) (unsigned char) (c))
 
 #define PHP_HTTP_IS_CTYPE(type, c) is##type((int) (unsigned char) (c))
 #define PHP_HTTP_TO_CTYPE(type, c) to##type((int) (unsigned char) (c))
 
+#include "php_http.h"
+
 #include "php_http_buffer.h"
 #include "php_http_strlist.h"
 #include "php_http_misc.h"
 #include "php_http_buffer.h"
 #include "php_http_strlist.h"
 #include "php_http_misc.h"
@@ -117,6 +124,15 @@ ZEND_EXTERN_MODULE_GLOBALS(php_http);
 #      define PHP_HTTP_G (&php_http_globals)
 #endif
 
 #      define PHP_HTTP_G (&php_http_globals)
 #endif
 
+#if PHP_DEBUG
+#      define _DPF_STR 0
+#      define _DPF_IN  1
+#      define _DPF_OUT 2
+extern void _dpf(int type, const char *data, size_t length);
+#else
+#      define _dpf(t,s,l);
+#endif
+
 #endif /* PHP_HTTP_API_H */
 
 
 #endif /* PHP_HTTP_API_H */
 
 
index 8066f82ff45cc3cbed2f15b96a2bcbf2e2d2059a..a92bb5e6d29c15ed80eed3ffcecfffb258d0a220 100644 (file)
@@ -12,8 +12,6 @@
 
 #include "php_http_api.h"
 
 
 #include "php_http_api.h"
 
-#include <ext/date/php_date.h>
-
 PHP_HTTP_API php_http_cookie_list_t *php_http_cookie_list_init(php_http_cookie_list_t *list TSRMLS_DC)
 {
        if (!list) {
 PHP_HTTP_API php_http_cookie_list_t *php_http_cookie_list_init(php_http_cookie_list_t *list TSRMLS_DC)
 {
        if (!list) {
index 5e588283570d87fd64e53df8c5abf5e130ac422a..91b476c3b5076e15997b5889879441519ef1d335 100644 (file)
@@ -21,9 +21,6 @@
 #      include <event.h>
 #endif
 
 #      include <event.h>
 #endif
 
-#include <ext/spl/spl_iterators.h>
-
-
 typedef struct php_http_curl_request {
        CURL *handle;
 
 typedef struct php_http_curl_request {
        CURL *handle;
 
@@ -512,6 +509,7 @@ static int php_http_curl_request_pool_socket_callback(CURL *easy, curl_socket_t
 
                        case CURL_POLL_REMOVE:
                                efree(ev);
 
                        case CURL_POLL_REMOVE:
                                efree(ev);
+                               /* no break */
                        case CURL_POLL_NONE:
                                return 0;
 
                        case CURL_POLL_NONE:
                                return 0;
 
index bc30b3c0d1adf50b3e90c4e000f197dd0871dea0..2ddcb7105fc1ed73776ae494bf5637698b695fe0 100644 (file)
 
 #include "php_http_api.h"
 
 
 #include "php_http_api.h"
 
-#include <ext/date/php_date.h>
-#include <ext/standard/php_string.h>
-
-
 static void set_option(zval *options, const char *name_str, size_t name_len, int type, const void *value_ptr, size_t value_len TSRMLS_DC)
 {
        if (Z_TYPE_P(options) == IS_OBJECT) {
 static void set_option(zval *options, const char *name_str, size_t name_len, int type, const void *value_ptr, size_t value_len TSRMLS_DC)
 {
        if (Z_TYPE_P(options) == IS_OBJECT) {
index 9b1c8db284acccf821ecf56a1f6216c4c2796598..121966b86a6f7292a912d0fc77dc4822595cce59 100644 (file)
@@ -401,13 +401,16 @@ static php_stream_filter *http_filter_create(const char *name, zval *params, int
                                        if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) {
                                                break;
                                        }
                                        if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) {
                                                break;
                                        }
+                                       /* no break */
                                default:
                                {
                                        zval *num = php_http_ztyp(IS_LONG, *tmp);
                                        
                                        flags |= (Z_LVAL_P(num) & 0x0fffffff);
                                        zval_ptr_dtor(&num);
                                default:
                                {
                                        zval *num = php_http_ztyp(IS_LONG, *tmp);
                                        
                                        flags |= (Z_LVAL_P(num) & 0x0fffffff);
                                        zval_ptr_dtor(&num);
+
                                }
                                }
+                               break;
                        }
                }
                if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_deflate_ops(), flags TSRMLS_CC))) {
                        }
                }
                if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_deflate_ops(), flags TSRMLS_CC))) {
index 07f793b6d1f99e7510381e6882e3d3f021b507e4..d6a7f755c76b73e0b6a6719f5ac1d42b80d222b1 100644 (file)
 
 #include "php_http_api.h"
 
 
 #include "php_http_api.h"
 
-#include <SAPI.h>
-#include <ext/spl/spl_iterators.h>
-#include <zend_interfaces.h>
-
 PHP_HTTP_API zend_bool php_http_message_info_callback(php_http_message_t **message, HashTable **headers, php_http_info_t *info TSRMLS_DC)
 {
        php_http_message_t *old = *message;
 PHP_HTTP_API zend_bool php_http_message_info_callback(php_http_message_t **message, HashTable **headers, php_http_info_t *info TSRMLS_DC)
 {
        php_http_message_t *old = *message;
index cfe0f48326d5ce86f29573ef25cdffc28ab61499..4ff36b5666c73bd9af3a467f933d7e16236cc0d8 100644 (file)
@@ -13,7 +13,6 @@
 #include "php_http_api.h"
 
 #include <ext/standard/php_lcg.h>
 #include "php_http_api.h"
 
 #include <ext/standard/php_lcg.h>
-#include <ext/standard/php_string.h>
 
 #define BOUNDARY_OPEN(body) \
        do {\
 
 #define BOUNDARY_OPEN(body) \
        do {\
index 4df85cfee6b3f421c9e53009bf5a64de502d6839..2860caa39a0704e65ca5093d3772bbaeee2dc21d 100644 (file)
@@ -13,7 +13,6 @@
 #include "php_http_api.h"
 
 #include <ext/standard/php_lcg.h>
 #include "php_http_api.h"
 
 #include <ext/standard/php_lcg.h>
-#include <ext/standard/php_string.h>
 #include <zend_exceptions.h>
 
 /* SLEEP */
 #include <zend_exceptions.h>
 
 /* SLEEP */
index 928a31df18a81eaa4d4cbd26bd23dcacea6cca0a..aeb95211d2ed7a180de6407bbd647b6df40d48da 100644 (file)
@@ -12,8 +12,6 @@
 
 #include "php_http_api.h"
 
 
 #include "php_http_api.h"
 
-#include <ext/standard/php_string.h>
-
 static int php_http_negotiate_sort(const void *a, const void *b TSRMLS_DC)
 {
        zval result, *first, *second;
 static int php_http_negotiate_sort(const void *a, const void *b TSRMLS_DC)
 {
        zval result, *first, *second;
index 7bf106913ceeb9fb42f27965ce3ec416d4bd6d0b..8a65237f8556962c579c34d47ca9ba703b959f5c 100644 (file)
@@ -16,8 +16,6 @@
 
 #include "php_http_request.h"
 
 
 #include "php_http_request.h"
 
-#include <ext/date/php_date.h>
-
 #include <neon/ne_auth.h>
 #include <neon/ne_compress.h>
 #include <neon/ne_session.h>
 #include <neon/ne_auth.h>
 #include <neon/ne_compress.h>
 #include <neon/ne_session.h>
index 4b0e3f4b72cd20cc4cb6e4b99c4789becb875849..5f11ee436321b3795e09e34246617f6932244c5d 100644 (file)
@@ -12,9 +12,6 @@
 
 #include "php_http_api.h"
 
 
 #include "php_http_api.h"
 
-#include <ext/standard/php_string.h>
-#include <zend_interfaces.h>
-
 static php_http_params_token_t def_param_sep = {",", 1}, *def_param_sep_ptr[] = {&def_param_sep, NULL};
 static php_http_params_token_t def_arg_sep = {";", 1}, *def_arg_sep_ptr[] = {&def_arg_sep, NULL};
 static php_http_params_token_t def_val_sep = {"=", 1}, *def_val_sep_ptr[] = {&def_val_sep, NULL};
 static php_http_params_token_t def_param_sep = {",", 1}, *def_param_sep_ptr[] = {&def_param_sep, NULL};
 static php_http_params_token_t def_arg_sep = {";", 1}, *def_arg_sep_ptr[] = {&def_arg_sep, NULL};
 static php_http_params_token_t def_val_sep = {"=", 1}, *def_val_sep_ptr[] = {&def_val_sep, NULL};
@@ -288,10 +285,13 @@ PHP_METHOD(HttpParams, __construct)
                        switch (ZEND_NUM_ARGS()) {
                                case 4:
                                        zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("param_sep"), param_sep TSRMLS_CC);
                        switch (ZEND_NUM_ARGS()) {
                                case 4:
                                        zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("param_sep"), param_sep TSRMLS_CC);
+                                       /* no break */
                                case 3:
                                        zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("arg_sep"), arg_sep TSRMLS_CC);
                                case 3:
                                        zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("arg_sep"), arg_sep TSRMLS_CC);
+                                       /* no break */
                                case 2:
                                        zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("val_sep"), val_sep TSRMLS_CC);
                                case 2:
                                        zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("val_sep"), val_sep TSRMLS_CC);
+                                       /* no break */
                        }
 
                        if (zparams) {
                        }
 
                        if (zparams) {
index ff768ba2afc3a340a9923237d3ac71d3de8ebf3b..fc75f6daeb511298c156eabe2c7b2a92b4e265b0 100644 (file)
@@ -159,7 +159,7 @@ static void php_http_property_proxy_object_write_dimension(zval *object, zval *o
        switch (Z_TYPE_P(property)) {
                case IS_NULL:
                        array_init(property);
        switch (Z_TYPE_P(property)) {
                case IS_NULL:
                        array_init(property);
-                       /* fallthrough */
+                       /* no break */
                case IS_ARRAY:
                        Z_ADDREF_P(value);
                        if (!offset) {
                case IS_ARRAY:
                        Z_ADDREF_P(value);
                        if (!offset) {
index eeeeb2063842bd5df14ebb611b7889e29813a274..ead598bbb9a4f19756906c06a6cb9ec6fa463c0c 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <php_variables.h>
 #include <ext/spl/spl_array.h>
 
 #include <php_variables.h>
 #include <ext/spl/spl_array.h>
-#include <zend_interfaces.h>
 
 #ifdef PHP_HTTP_HAVE_ICONV
 #      undef PHP_ATOM_INC
 
 #ifdef PHP_HTTP_HAVE_ICONV
 #      undef PHP_ATOM_INC
index 9bd820cd80f4ecde228862b56b6d7983bb4ff89a..ea4d4dd39de76b5108c8e118cebae5fc56c82e7e 100644 (file)
@@ -13,7 +13,6 @@
 #include "php_http_api.h"
 
 #include <ext/spl/spl_observer.h>
 #include "php_http_api.h"
 
 #include <ext/spl/spl_observer.h>
-#include <ext/spl/spl_iterators.h>
 
 PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
 {
 
 PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
 {
index 8bbaeb99747d2161c34ae42e8e4f77af8d9b8f78..8312943877437045b95743bc07324f57ecc33cd3 100644 (file)
@@ -13,8 +13,6 @@
 #include "php_http_api.h"
 
 #include <curl/curl.h>
 #include "php_http_api.h"
 
 #include <curl/curl.h>
-#include <ext/standard/php_string.h>
-#include <ext/spl/spl_iterators.h>
 
 static int php_http_request_datashare_compare_handles(void *h1, void *h2);
 
 
 static int php_http_request_datashare_compare_handles(void *h1, void *h2);
 
index e69f6d1886849ec2aaa58c7295a6d57c11837303..b1655f6b8fd7c44113b3a099f28695a3af529ed1 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "php_http_api.h"
 
 
 #include "php_http_api.h"
 
-#include <ext/standard/php_string.h>
 #include <ext/spl/spl_observer.h>
 
 /*
 #include <ext/spl/spl_observer.h>
 
 /*
index 08768096071e12aea696f041ac553154f64ccab9..4930122b5517ba0e2088103d5d2f533b3079c708 100644 (file)
@@ -12,8 +12,6 @@
 
 #include "php_http_api.h"
 
 
 #include "php_http_api.h"
 
-#include <ext/spl/spl_iterators.h>
-
 PHP_HTTP_API php_http_request_pool_t *php_http_request_pool_init(php_http_request_pool_t *h, php_http_request_pool_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
 {
        php_http_request_pool_t *free_h = NULL;
 PHP_HTTP_API php_http_request_pool_t *php_http_request_pool_init(php_http_request_pool_t *h, php_http_request_pool_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
 {
        php_http_request_pool_t *free_h = NULL;
index 7fe16645338910d10be2d7fae4751cdd96ef16ea..b55b7d7028d109532fe25d5f13e8da9751b20423 100644 (file)
@@ -12,9 +12,6 @@
 
 #include "php_http_api.h"
 
 
 #include "php_http_api.h"
 
-#include <SAPI.h>
-#include <ext/standard/php_string.h>
-
 static inline char *localhostname(void)
 {
        char hostname[1024] = {0};
 static inline char *localhostname(void)
 {
        char hostname[1024] = {0};
@@ -246,7 +243,7 @@ PHP_HTTP_API void php_http_url(int flags, const php_url *old_url, const php_url
                                                /* .. at the end */
                                                ptr[1] = '\0';
                                        }
                                                /* .. at the end */
                                                ptr[1] = '\0';
                                        }
-                                       /* fallthrough */
+                                       /* no break */
                                
                                default:
                                        /* something else */
                                
                                default:
                                        /* something else */
index 02535d84e3c2088cefbd2f097198b3278f7f948c..3216403502df9fcb87a24fbf322b785314bf7e6b 100644 (file)
@@ -113,9 +113,11 @@ static inline HashTable *php_http_url_to_struct(php_url *url, zval *strct TSRMLS
                        default:
                                zval_dtor(strct);
                                array_init(strct);
                        default:
                                zval_dtor(strct);
                                array_init(strct);
+                               /* no break */
                        case IS_ARRAY:
                        case IS_OBJECT:
                                INIT_PZVAL_ARRAY((&arr), HASH_OF(strct));
                        case IS_ARRAY:
                        case IS_OBJECT:
                                INIT_PZVAL_ARRAY((&arr), HASH_OF(strct));
+                               break;
                }
        } else {
                INIT_PZVAL(&arr);
                }
        } else {
                INIT_PZVAL(&arr);