]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1619297, r1621806 from trunk:
authorJim Jagielski <jim@apache.org>
Fri, 26 Sep 2014 10:59:00 +0000 (10:59 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 26 Sep 2014 10:59:00 +0000 (10:59 +0000)
Missing va_end spotted by cppcheck

Silent some cppcheck warnings.
Submitted by: jailletc36
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1627747 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/mappers/mod_negotiation.c
modules/proxy/mod_proxy_wstunnel.c
server/util_ebcdic.c
server/util_expr_eval.c

diff --git a/STATUS b/STATUS
index 1b22beb3e7f9f016761b1218fc145f128f8e4e5b..477c0511ddb8e7b49cf99b2a3dce077dc6810e19 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -102,13 +102,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * core: Add missing va_end spotted by cppcheck
-     various: Silent some cppcheck warnings
-     trunk patch: http://svn.apache.org/r1619297 
-                  http://svn.apache.org/r1621806
-     2.4.x patch: trunk works (except for mod_journald which is not part of 2.4.x)
-     +1: jailletc36, jim, ylavic
-
    * mod_cache: CVE-2014-3581 - Avoid a crash when Content-Type has an empty
      value. PR56924.
      trunk patch: http://svn.apache.org/r1624234
index 5ec0d4d02de4d2257d8f79df5d7d82af1741ddbf..0089a6c91cf9d3fe24cb2a3391f0850afa51f47a 100644 (file)
@@ -1707,7 +1707,7 @@ static void set_language_quality(negotiation_state *neg, var_rec *variant)
              * we are allowed to use the prefix of in HTTP/1.1
              */
             char *lang = ((char **) (variant->content_languages->elts))[j];
-            int idx = -1;
+            int idx;
 
             /* If we wish to fallback or
              * we use our own LanguagePriority index.
index c30c4aa73c68205476f2408985db69190ec9447c..6013549ac66d6f2f0fb8f3caba682a49dea0a05a 100644 (file)
@@ -151,7 +151,7 @@ static int ap_proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
                                 apr_uri_t *uri,
                                 char *url, char *server_portstr)
 {
-    apr_status_t rv = APR_SUCCESS;
+    apr_status_t rv;
     apr_pollset_t *pollset;
     apr_pollfd_t pollfd;
     const apr_pollfd_t *signalled;
index 7faae794de91f26fb0850c569369df60468e5de6..dc13706465aee3967804c61a967679569a97de98 100644 (file)
@@ -104,8 +104,10 @@ int ap_rvputs_proto_in_ascii(request_rec *r, ...)
         len = strlen(s);
         ascii_s = apr_pstrmemdup(r->pool, s, len);
         ap_xlate_proto_to_ascii(ascii_s, len);
-        if (ap_rputs(ascii_s, r) < 0)
+        if (ap_rputs(ascii_s, r) < 0) {
+            va_end(va);
             return -1;
+        }
         written += len;
     }
     va_end(va);
index 0c4ba1fd406de52234d523f5f077adca5e50a4ba..bb427d17530e32c924edfbbeb2b787797cde9e01 100644 (file)
@@ -236,10 +236,8 @@ static int ap_expr_eval_comp(ap_expr_eval_ctx_t *ctx, const ap_expr_t *node)
                 do {
                     const ap_expr_t *val = e2->node_arg1;
                     AP_DEBUG_ASSERT(e2->node_op == op_ListElement);
-                    if (strcmp(needle, ap_expr_eval_word(ctx, val)) == 0) {
+                    if (strcmp(needle, ap_expr_eval_word(ctx, val)) == 0)
                         return 1;
-                        break;
-                    }
                     e2 = e2->node_arg2;
                 } while (e2 != NULL);
             }