fix some warnings
authorMichael Wallner <mike@php.net>
Wed, 27 Jul 2011 15:15:10 +0000 (15:15 +0000)
committerMichael Wallner <mike@php.net>
Wed, 27 Jul 2011 15:15:10 +0000 (15:15 +0000)
php_http_encoding.c
php_http_env.c
php_http_env_response.c
php_http_message.c
php_http_params.c
php_http_property_proxy.c
php_http_request.c

index a418a21b1ef6069ade6823ebdbdb7c9436a1422d..e40de8af0098538469dc0af46f66f83dc49b119d 100644 (file)
@@ -222,6 +222,7 @@ retry_raw_inflate:
                                        wbits = PHP_HTTP_WINDOW_BITS_RAW;
                                        goto retry_raw_inflate;
                                }
+                               break;
                }
                inflateEnd(&Z);
 
@@ -509,6 +510,7 @@ retry_raw_inflate:
                                inflateInit2(ctx, PHP_HTTP_WINDOW_BITS_RAW);
                                goto retry_raw_inflate;
                        }
+                       break;
        }
        
        php_http_error(HE_WARNING, PHP_HTTP_E_ENCODING, "Failed to update inflate stream: %s", zError(status));
index 042150517633508097f23bf11a63083bc11e02ed..b936ab1fd56ebda48c6449afe125f73c8532f076 100644 (file)
@@ -589,10 +589,6 @@ PHP_HTTP_BEGIN_ARGS(persistentHandlesClean, 0)
        PHP_HTTP_ARG_VAL(ident, 0)
 PHP_HTTP_END_ARGS;
 
-PHP_HTTP_BEGIN_ARGS(persistentHandlesIdent, 0)
-       PHP_HTTP_ARG_VAL(name, 0)
-PHP_HTTP_END_ARGS;
-
 PHP_HTTP_BEGIN_ARGS(parseParams, 1)
        PHP_HTTP_ARG_VAL(params, 0)
        PHP_HTTP_ARG_VAL(flags, 0)
index e30cab955b9df80016b5d1f2f7a8b54ab1bdafd3..f6e23cfa029252afd69829cf04f4438bd3a957b1 100644 (file)
@@ -392,6 +392,7 @@ static STATUS php_http_env_response_send_head(php_http_env_response_t *r)
                                switch (Z_LVAL_P(zdisposition_copy)) {
                                        case PHP_HTTP_CONTENT_DISPOSITION_NONE:
                                                ret = php_http_env_set_response_header_value(0, ZEND_STRL("Content-Disposition"), NULL, 1 TSRMLS_CC);
+                                               break;
                                        case PHP_HTTP_CONTENT_DISPOSITION_INLINE:
                                                tmp = "inline";
                                                break;
@@ -496,6 +497,7 @@ static STATUS php_http_env_response_send_head(php_http_env_response_t *r)
                                if (PHP_HTTP_CACHE_HIT != php_http_env_is_response_cached_by_last_modified(options, ZEND_STRL("If-Modified-Since") TSRMLS_CC)) {
                                        break;
                                }
+                               /*  fallthrough */
 
                        case PHP_HTTP_CACHE_HIT:
                                ret = php_http_env_set_response_code(304 TSRMLS_CC);
@@ -664,6 +666,8 @@ PHP_HTTP_API STATUS php_http_env_response_send(php_http_env_response_t *r)
                                                }
                                                break;
                                        }
+
+                                       break;
                        }
                }
        } else if (zbody) {
index 0d11d0168ae0b53fe15988bd6748265ad7727022..12c189e8656dd6a1f1df37e1ec1f21f2a17aa5f8 100644 (file)
@@ -382,8 +382,9 @@ PHP_HTTP_API php_http_message_t *php_http_message_reverse(php_http_message_t *ms
        php_http_message_count(c, msg);
        
        if (c > 1) {
-               php_http_message_t *tmp = msg, **arr = ecalloc(c, sizeof(**arr));
-               
+               php_http_message_t *tmp = msg, **arr;
+
+               arr = ecalloc(c, sizeof(**arr));
                for (i = 0; i < c; ++i) {
                        arr[i] = tmp;
                        tmp = tmp->parent;
@@ -709,20 +710,12 @@ PHP_HTTP_BEGIN_ARGS(setHttpVersion, 1)
        PHP_HTTP_ARG_VAL(http_version, 0)
 PHP_HTTP_END_ARGS;
 
-PHP_HTTP_BEGIN_ARGS(guessContentType, 1)
-       PHP_HTTP_ARG_VAL(magic_file, 0)
-       PHP_HTTP_ARG_VAL(magic_mode, 0)
-PHP_HTTP_END_ARGS;
-
 PHP_HTTP_EMPTY_ARGS(getParentMessage);
-PHP_HTTP_EMPTY_ARGS(send);
 PHP_HTTP_EMPTY_ARGS(__toString);
 PHP_HTTP_BEGIN_ARGS(toString, 0)
        PHP_HTTP_ARG_VAL(include_parent, 0)
 PHP_HTTP_END_ARGS;
 
-PHP_HTTP_EMPTY_ARGS(toMessageTypeObject);
-
 PHP_HTTP_EMPTY_ARGS(count);
 
 PHP_HTTP_EMPTY_ARGS(serialize);
@@ -811,9 +804,11 @@ static STATUS php_http_message_object_add_prophandler(const char *prop_str, size
        php_http_message_object_prophandler_t h = { read, write };
        return zend_hash_add(&php_http_message_object_prophandlers, prop_str, prop_len + 1, (void *) &h, sizeof(h), NULL);
 }
+/*
 static int php_http_message_object_has_prophandler(const char *prop_str, size_t prop_len) {
        return zend_hash_exists(&php_http_message_object_prophandlers, prop_str, prop_len + 1);
 }
+*/
 static STATUS php_http_message_object_get_prophandler(const char *prop_str, size_t prop_len, php_http_message_object_prophandler_t **handler) {
        return zend_hash_find(&php_http_message_object_prophandlers, prop_str, prop_len + 1, (void *) handler);
 }
index b056048018de5dbb038acdccba96f27805ca92c8..e4d4a6fb88c7a78a6febf9988feca22c52b10423 100644 (file)
@@ -129,6 +129,7 @@ PHP_HTTP_API STATUS php_http_params_parse(const char *param, int flags, php_http
                                                if (flags & PHP_HTTP_PARAMS_ALLOW_COMMA) {
                                                        goto add;
                                                }
+                                               /* fallthrough */
                                        default:
                                                if (!val) {
                                                        val = c;
@@ -143,6 +144,7 @@ PHP_HTTP_API STATUS php_http_params_parse(const char *param, int flags, php_http
                                                if (flags & PHP_HTTP_PARAMS_ALLOW_COMMA) {
                                                        goto allow_comma;
                                                }
+                                               /* fallthrough */
                                        case '\r':
                                        case '\n':
                                        case '\t':
index 44ccd2cdf1665c0d0405a0a0c79ae9e6dd61cd77..426f3c3dd2a6f5d63d7b7575d4c2f6b4df80c594 100644 (file)
@@ -149,6 +149,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 */
                case IS_ARRAY:
                        Z_ADDREF_P(value);
                        if (!offset) {
index d3ac782c793202830bdd8c7e7caec7c0aae08054..857beea978dfc66014bd507b5ad3719848aa1afb 100644 (file)
@@ -213,9 +213,7 @@ PHP_HTTP_BEGIN_ARGS(setMessageClass, 1)
 PHP_HTTP_END_ARGS;
 
 PHP_HTTP_EMPTY_ARGS(getResponseMessage);
-PHP_HTTP_EMPTY_ARGS(getRawResponseMessage);
 PHP_HTTP_EMPTY_ARGS(getRequestMessage);
-PHP_HTTP_EMPTY_ARGS(getRawRequestMessage);
 PHP_HTTP_EMPTY_ARGS(getHistory);
 PHP_HTTP_EMPTY_ARGS(clearHistory);
 PHP_HTTP_EMPTY_ARGS(send);