]> granicus.if.org Git - apache/commitdiff
Silent some cppcheck warnings.
authorChristophe Jaillet <jailletc36@apache.org>
Mon, 1 Sep 2014 14:40:01 +0000 (14:40 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Mon, 1 Sep 2014 14:40:01 +0000 (14:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621806 13f79535-47bb-0310-9956-ffa450edef68

modules/loggers/mod_journald.c
modules/mappers/mod_negotiation.c
modules/proxy/mod_proxy_wstunnel.c
server/util_expr_eval.c

index c0cc9c3a31c4e96081592faca583619c38cd6e05..14e6f76e5a0e1b90ff25cf13235bc6bd67f35d9b 100644 (file)
@@ -114,9 +114,9 @@ static void journald_log(apr_pool_t *pool, const char *log,
     /* Adds new entry to iovec if previous additions were successful. */
 #define IOVEC_ADD_LEN(FORMAT, VAR, LEN) \
     if (rv == APR_SUCCESS && iov_size < MAX_ENTRIES) { \
-        if ((rv = iovec_add_entry(subpool, &iov[iov_size], FORMAT, LEN, VAR)) \
-            == APR_SUCCESS) \
-                iov_size++; \
+        rv = iovec_add_entry(subpool, &iov[iov_size], FORMAT, LEN, VAR); \
+        if (rv == APR_SUCCESS) \
+            iov_size++; \
     }
 #define IOVEC_ADD(FORMAT, VAR) IOVEC_ADD_LEN(FORMAT, VAR, -1)
 
index 85650bf0b34b9b60edc931e7e4709bb03edf9cf7..536ae8a74a51c9b7303d13e1c150665701fdd636 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 cba25a0cb18027e35ae18f298ba15e6153683d74..f32ae80e7a5bf8c2c3f6be8caa2ad309a3d594f9 100644 (file)
@@ -318,7 +318,7 @@ static int proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
                                 apr_uri_t *uri,
                                 char *url, char *server_portstr, char *scheme)
 {
-    apr_status_t rv = APR_SUCCESS;
+    apr_status_t rv;
     apr_pollset_t *pollset;
     apr_pollfd_t pollfd;
     conn_rec *c = r->connection;
index 562356e5876278bdec36869c86c77c5081aaf38b..8ac890e9ceba529c10f3fd8cbe1864a868f0ea9f 100644 (file)
@@ -240,10 +240,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);
             }