Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D7F63BDD for ; Sat, 30 Apr 2011 21:19:21 +0000 (UTC) Received: (qmail 45577 invoked by uid 500); 30 Apr 2011 21:19:20 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 45531 invoked by uid 500); 30 Apr 2011 21:19:20 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 45524 invoked by uid 99); 30 Apr 2011 21:19:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Apr 2011 21:19:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Apr 2011 21:19:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1EE2423888EA; Sat, 30 Apr 2011 21:18:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1098162 - in /httpd/httpd/trunk: modules/cluster/ modules/filters/ modules/generators/ modules/mappers/ modules/metadata/ server/ support/ Date: Sat, 30 Apr 2011 21:18:58 -0000 To: cvs@httpd.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110430211859.1EE2423888EA@eris.apache.org> Author: trawick Date: Sat Apr 30 21:18:58 2011 New Revision: 1098162 URL: http://svn.apache.org/viewvc?rev=1098162&view=rev Log: fix some dead assignments found by the clang analyzer Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c httpd/httpd/trunk/modules/filters/mod_deflate.c httpd/httpd/trunk/modules/generators/mod_autoindex.c httpd/httpd/trunk/modules/generators/mod_cgid.c httpd/httpd/trunk/modules/mappers/mod_negotiation.c httpd/httpd/trunk/modules/mappers/mod_rewrite.c httpd/httpd/trunk/modules/mappers/mod_vhost_alias.c httpd/httpd/trunk/modules/metadata/mod_expires.c httpd/httpd/trunk/modules/metadata/mod_setenvif.c httpd/httpd/trunk/modules/metadata/mod_unique_id.c httpd/httpd/trunk/server/core_filters.c httpd/httpd/trunk/support/htcacheclean.c Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original) +++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Sat Apr 30 21:18:58 2011 @@ -252,8 +252,9 @@ static apr_status_t hm_file_update_stat( char *t; apr_table_t *hbt = apr_table_make(pool, 10); apr_bucket_alloc_t *ba = apr_bucket_alloc_create(pool); - apr_bucket_brigade *bb = apr_brigade_create(pool, ba); - apr_bucket_brigade *tmpbb = apr_brigade_create(pool, ba); + apr_bucket_brigade *bb; + apr_bucket_brigade *tmpbb; + rv = apr_file_info_get(&fi, APR_FINFO_SIZE | APR_FINFO_MTIME, fpin); if (rv) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/filters/mod_deflate.c (original) +++ httpd/httpd/trunk/modules/filters/mod_deflate.c Sat Apr 30 21:18:58 2011 @@ -540,7 +540,7 @@ static apr_status_t deflate_out_filter(a /* skip parameters, XXX: ;q=foo evaluation? */ while (*accepts == ';') { ++accepts; - token = ap_get_token(r->pool, &accepts, 1); + ap_get_token(r->pool, &accepts, 1); } /* retrieve next token */ Modified: httpd/httpd/trunk/modules/generators/mod_autoindex.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_autoindex.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/generators/mod_autoindex.c (original) +++ httpd/httpd/trunk/modules/generators/mod_autoindex.c Sat Apr 30 21:18:58 2011 @@ -1504,7 +1504,6 @@ static void output_directories(struct en { int x; apr_size_t rv; - char *name = r->uri; char *tp; int static_columns = !!(autoindex_opts & SUPPRESS_COLSORT); apr_pool_t *scratch; @@ -1515,9 +1514,6 @@ static void output_directories(struct en char *breakrow = ""; apr_pool_create(&scratch, r->pool); - if (name[0] == '\0') { - name = "/"; - } name_width = d->name_width; desc_width = d->desc_width; Modified: httpd/httpd/trunk/modules/generators/mod_cgid.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgid.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/generators/mod_cgid.c (original) +++ httpd/httpd/trunk/modules/generators/mod_cgid.c Sat Apr 30 21:18:58 2011 @@ -1444,13 +1444,6 @@ static int cgid_handler(request_rec *r) apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool); apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket); - if ((argv0 = strrchr(r->filename, '/')) != NULL) { - argv0++; - } - else { - argv0 = r->filename; - } - /* Transfer any put/post args, CERN style... * Note that we already ignore SIGPIPE in the core server. */ Modified: httpd/httpd/trunk/modules/mappers/mod_negotiation.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_negotiation.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/mappers/mod_negotiation.c (original) +++ httpd/httpd/trunk/modules/mappers/mod_negotiation.c Sat Apr 30 21:18:58 2011 @@ -1583,7 +1583,6 @@ static void set_language_quality(negotia p = NULL; bestthistag = NULL; longest_lang_range_len = 0; - alen = 0; /* lang is the variant's language-tag, which is the one * we are allowed to use the prefix of in HTTP/1.1 Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original) +++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Sat Apr 30 21:18:58 2011 @@ -1479,7 +1479,6 @@ static char *lookup_map_program(request_ } if (nbytes == 1 && !found_nl) { - i = 0; continue; } } @@ -4254,7 +4253,6 @@ static int apply_rewrite_list(request_re while ( i < rewriterules->nelts && s > 0) { i++; - p = &entries[i]; s--; } } Modified: httpd/httpd/trunk/modules/mappers/mod_vhost_alias.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_vhost_alias.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/mappers/mod_vhost_alias.c (original) +++ httpd/httpd/trunk/modules/mappers/mod_vhost_alias.c Sat Apr 30 21:18:58 2011 @@ -306,7 +306,7 @@ static void vhost_alias_interpolate(requ continue; } /* deal with %-N+.-M+ -- syntax is already checked */ - N = M = 0; /* value */ + M = 0; /* value */ Np = Mp = 0; /* is there a plus? */ Nd = Md = 0; /* is there a dash? */ if (*map == '-') ++map, Nd = 1; Modified: httpd/httpd/trunk/modules/metadata/mod_expires.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_expires.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/metadata/mod_expires.c (original) +++ httpd/httpd/trunk/modules/metadata/mod_expires.c Sat Apr 30 21:18:58 2011 @@ -217,7 +217,7 @@ static char *check_code(apr_pool_t *p, c char base = 'X'; int modifier = 0; int num = 0; - int factor = 0; + int factor; /* 0.0.4 compatibility? */ @@ -274,7 +274,6 @@ static char *check_code(apr_pool_t *p, c return apr_pstrcat(p, "bad expires code, missing ", NULL); } - factor = 0; if (!strncasecmp(word, "years", 1)) { factor = 60 * 60 * 24 * 365; } Modified: httpd/httpd/trunk/modules/metadata/mod_setenvif.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_setenvif.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/metadata/mod_setenvif.c (original) +++ httpd/httpd/trunk/modules/metadata/mod_setenvif.c Sat Apr 30 21:18:58 2011 @@ -453,7 +453,6 @@ static const char *add_setenvifexpr(cmd_ char *expr; sei_cfg_rec *sconf; sei_entry *new; - sei_entry *entries; const char *err; /* @@ -465,7 +464,6 @@ static const char *add_setenvifexpr(cmd_ ? (sei_cfg_rec *) mconfig : (sei_cfg_rec *) ap_get_module_config(cmd->server->module_config, &setenvif_module); - entries = (sei_entry *) sconf->conditionals->elts; /* get expr */ expr = ap_getword_conf(cmd->pool, &args); if (!*expr) { Modified: httpd/httpd/trunk/modules/metadata/mod_unique_id.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_unique_id.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/modules/metadata/mod_unique_id.c (original) +++ httpd/httpd/trunk/modules/metadata/mod_unique_id.c Sat Apr 30 21:18:58 2011 @@ -307,7 +307,6 @@ static const char *gen_unique_id(const r /* we'll use a temporal buffer to avoid uuencoding the possible internal * paddings of the original structure */ x = (unsigned char *) &paddedbuf; - y = (unsigned char *) &new_unique_id; k = 0; for (i = 0; i < UNIQUE_ID_REC_MAX; i++) { y = ((unsigned char *) &new_unique_id) + unique_id_rec_offset[i]; Modified: httpd/httpd/trunk/server/core_filters.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core_filters.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/server/core_filters.c (original) +++ httpd/httpd/trunk/server/core_filters.c Sat Apr 30 21:18:58 2011 @@ -599,7 +599,6 @@ static apr_status_t send_brigade_nonbloc for (bucket = APR_BRIGADE_FIRST(bb); bucket != APR_BRIGADE_SENTINEL(bb); bucket = next) { - int did_sendfile = 0; next = APR_BUCKET_NEXT(bucket); #if APR_HAS_SENDFILE if (APR_BUCKET_IS_FILE(bucket)) { @@ -613,7 +612,6 @@ static apr_status_t send_brigade_nonbloc if ((apr_file_flags_get(fd) & APR_SENDFILE_ENABLED) && (bucket->length >= AP_MIN_SENDFILE_BYTES)) { - did_sendfile = 1; if (nvec > 0) { (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 1); rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); @@ -634,7 +632,8 @@ static apr_status_t send_brigade_nonbloc } } #endif /* APR_HAS_SENDFILE */ - if (!did_sendfile && !APR_BUCKET_IS_METADATA(bucket)) { + /* didn't sendfile */ + if (!APR_BUCKET_IS_METADATA(bucket)) { const char *data; apr_size_t length; rv = apr_bucket_read(bucket, &data, &length, APR_BLOCK_READ); Modified: httpd/httpd/trunk/support/htcacheclean.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htcacheclean.c?rev=1098162&r1=1098161&r2=1098162&view=diff ============================================================================== --- httpd/httpd/trunk/support/htcacheclean.c (original) +++ httpd/httpd/trunk/support/htcacheclean.c Sat Apr 30 21:18:58 2011 @@ -614,7 +614,6 @@ static int process_dir(char *path, apr_p apr_pool_create(&p, pool); h = apr_hash_make(p); fd = NULL; - skip = 0; deviation = MAXDEVIATION * APR_USEC_PER_SEC; if (apr_dir_open(&dir, path, p) != APR_SUCCESS) {