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 cd95f48..1fc0513 100644 (file)
@@ -13,7 +13,6 @@
 #include "php_http_api.h"
 
 #include <php_ini.h>
-#include <ext/standard/php_string.h>
 #include <ext/standard/info.h>
 
 #include <zlib.h>
index 94ed04e..e8d5e40 100644 (file)
@@ -20,15 +20,6 @@ extern zend_module_entry http_module_entry;
 
 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 */
 
 /*
index 5cf64c9..47b6869 100644 (file)
 #include "config.h"
 #endif
 
-#include <php.h>
 #include <php_config.h>
+#include <php.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)
@@ -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))
 
+#include "php_http.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
 
+#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 */
 
 
index 8066f82..a92bb5e 100644 (file)
@@ -12,8 +12,6 @@
 
 #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) {
index 5e58828..91b476c 100644 (file)
@@ -21,9 +21,6 @@
 #      include <event.h>
 #endif
 
-#include <ext/spl/spl_iterators.h>
-
-
 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);
+                               /* no break */
                        case CURL_POLL_NONE:
                                return 0;
 
index bc30b3c..2ddcb71 100644 (file)
 
 #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) {
index 9b1c8db..121966b 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;
                                        }
+                                       /* no break */
                                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))) {
index 07f793b..d6a7f75 100644 (file)
 
 #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;
index cfe0f48..4ff36b5 100644 (file)
@@ -13,7 +13,6 @@
 #include "php_http_api.h"
 
 #include <ext/standard/php_lcg.h>
-#include <ext/standard/php_string.h>
 
 #define BOUNDARY_OPEN(body) \
        do {\
index 4df85cf..2860caa 100644 (file)
@@ -13,7 +13,6 @@
 #include "php_http_api.h"
 
 #include <ext/standard/php_lcg.h>
-#include <ext/standard/php_string.h>
 #include <zend_exceptions.h>
 
 /* SLEEP */
index 928a31d..aeb9521 100644 (file)
@@ -12,8 +12,6 @@
 
 #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;
index 7bf1069..8a65237 100644 (file)
@@ -16,8 +16,6 @@
 
 #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>
index 4b0e3f4..5f11ee4 100644 (file)
@@ -12,9 +12,6 @@
 
 #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};
@@ -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);
+                                       /* no break */
                                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);
+                                       /* no break */
                        }
 
                        if (zparams) {
index ff768ba..fc75f6d 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);
-                       /* fallthrough */
+                       /* no break */
                case IS_ARRAY:
                        Z_ADDREF_P(value);
                        if (!offset) {
index eeeeb20..ead598b 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <php_variables.h>
 #include <ext/spl/spl_array.h>
-#include <zend_interfaces.h>
 
 #ifdef PHP_HTTP_HAVE_ICONV
 #      undef PHP_ATOM_INC
index 9bd820c..ea4d4dd 100644 (file)
@@ -13,7 +13,6 @@
 #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)
 {
index 8bbaeb9..8312943 100644 (file)
@@ -13,8 +13,6 @@
 #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);
 
index e69f6d1..b1655f6 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "php_http_api.h"
 
-#include <ext/standard/php_string.h>
 #include <ext/spl/spl_observer.h>
 
 /*
index 0876809..4930122 100644 (file)
@@ -12,8 +12,6 @@
 
 #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;
index 7fe1664..b55b7d7 100644 (file)
@@ -12,9 +12,6 @@
 
 #include "php_http_api.h"
 
-#include <SAPI.h>
-#include <ext/standard/php_string.h>
-
 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';
                                        }
-                                       /* fallthrough */
+                                       /* no break */
                                
                                default:
                                        /* something else */
index 02535d8..3216403 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);
+                               /* no break */
                        case IS_ARRAY:
                        case IS_OBJECT:
                                INIT_PZVAL_ARRAY((&arr), HASH_OF(strct));
+                               break;
                }
        } else {
                INIT_PZVAL(&arr);