From 2785b009e97471249eea741fd65269456bddec7e Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Mon, 1 Sep 2014 14:40:01 +0000 Subject: [PATCH] Silent some cppcheck warnings. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621806 13f79535-47bb-0310-9956-ffa450edef68 --- modules/loggers/mod_journald.c | 6 +++--- modules/mappers/mod_negotiation.c | 2 +- modules/proxy/mod_proxy_wstunnel.c | 2 +- server/util_expr_eval.c | 4 +--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/loggers/mod_journald.c b/modules/loggers/mod_journald.c index c0cc9c3a31..14e6f76e5a 100644 --- a/modules/loggers/mod_journald.c +++ b/modules/loggers/mod_journald.c @@ -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) diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 85650bf0b3..536ae8a74a 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -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. diff --git a/modules/proxy/mod_proxy_wstunnel.c b/modules/proxy/mod_proxy_wstunnel.c index cba25a0cb1..f32ae80e7a 100644 --- a/modules/proxy/mod_proxy_wstunnel.c +++ b/modules/proxy/mod_proxy_wstunnel.c @@ -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; diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index 562356e587..8ac890e9ce 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -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); } -- 2.50.1