httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r982016 - in /httpd/httpd/trunk/modules: aaa/ arch/netware/ cache/ dav/main/ filters/ proxy/
Date Tue, 03 Aug 2010 19:45:22 GMT
Author: sf
Date: Tue Aug  3 19:45:21 2010
New Revision: 982016

URL: http://svn.apache.org/viewvc?rev=982016&view=rev
Log:
- Remove a load of unused variables (or variables that are set but never read).
- Move some declarations into the correct #ifdef scope.

I couldn't compile/test netware, but the changes look obvious enough.

Modified:
    httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c
    httpd/httpd/trunk/modules/arch/netware/mod_netware.c
    httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
    httpd/httpd/trunk/modules/cache/mod_cache.c
    httpd/httpd/trunk/modules/dav/main/mod_dav.c
    httpd/httpd/trunk/modules/filters/mod_filter.c
    httpd/httpd/trunk/modules/filters/mod_include.c
    httpd/httpd/trunk/modules/filters/regexp.c
    httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authnz_ldap.c Tue Aug  3 19:45:21 2010
@@ -119,13 +119,10 @@ static char *to_charset = NULL;         
 /* Derive a code page ID give a language name or ID */
 static char* derive_codepage_from_lang (apr_pool_t *p, char *language)
 {
-    int lang_len;
     char *charset;
 
     if (!language)          /* our default codepage */
         return apr_pstrdup(p, "ISO-8859-1");
-    else
-        lang_len = strlen(language);
 
     charset = (char*) apr_hash_get(charset_conversions, language, APR_HASH_KEY_STRING);
 

Modified: httpd/httpd/trunk/modules/arch/netware/mod_netware.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/netware/mod_netware.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/netware/mod_netware.c (original)
+++ httpd/httpd/trunk/modules/arch/netware/mod_netware.c Tue Aug  3 19:45:21 2010
@@ -101,7 +101,6 @@ static apr_status_t ap_cgi_build_command
     char *cmd_only, *ptr;
     const char *new_cmd;
     netware_dir_config *d;
-    apr_file_t *fh;
     const char *args = "";
 
     d = (netware_dir_config *)ap_get_module_config(r->per_dir_config,

Modified: httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c (original)
+++ httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c Tue Aug  3 19:45:21 2010
@@ -233,12 +233,10 @@ static int make_secure_socket(apr_pool_t
                               char* key, int mutual, server_rec *sconf)
 {
     int s;
-    int one = 1;
     char addr[MAX_ADDRESS];
     struct sslserveropts opts;
     unsigned int optParam;
     WSAPROTOCOL_INFO SecureProtoInfo;
-    int no = 1;
 
     if (server->sin_addr.s_addr != htonl(INADDR_ANY))
         apr_snprintf(addr, sizeof(addr), "address %s port %d",
@@ -546,7 +544,6 @@ static const char *set_secure_upgradeabl
                                        const char *ips, const char* key)
 {
     NWSSLSrvConfigRec* sc = get_nwssl_cfg(cmd->server);
-    seclistenup_rec *listen_node;
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     char *ports, *addr;
     unsigned short port;
@@ -626,8 +623,6 @@ static int nwssl_pre_config(apr_pool_t *
                          apr_pool_t *ptemp)
 {
     seclisten_rec* ap_old_seclisteners;
-    char *ports, *addr;
-    unsigned short port;
     ap_listen_rec **walk;
     seclisten_rec **secwalk;
     apr_sockaddr_t *sa;
@@ -724,7 +719,6 @@ static int nwssl_post_config(apr_pool_t 
     ap_listen_rec *walk;
     seclisten_rec *secwalk, *lastsecwalk;
     apr_sockaddr_t *sa;
-    int found_listener = 0;
 
     /* Walk the old listeners list and compare it to the secure
        listeners list and remove any secure listener records that
@@ -896,8 +890,6 @@ static int isSecureUpgraded (const reque
 
 static int nwssl_hook_Fixup(request_rec *r)
 {
-    int i;
-
     if (!isSecure(r) && !isSecureUpgraded(r))
         return DECLINED;
 

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Tue Aug  3 19:45:21 2010
@@ -885,7 +885,6 @@ static int cache_save_filter(ap_filter_t
          * buckets and use their length to calculate the size
          */
         int all_buckets_here=0;
-        int unresolved_length = 0;
         size=0;
         for (e = APR_BRIGADE_FIRST(in);
              e != APR_BRIGADE_SENTINEL(in);
@@ -896,7 +895,6 @@ static int cache_save_filter(ap_filter_t
                 break;
             }
             if (APR_BUCKET_IS_FLUSH(e)) {
-                unresolved_length = 1;
                 continue;
             }
             if (e->length == (apr_size_t)-1) {

Modified: httpd/httpd/trunk/modules/dav/main/mod_dav.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/mod_dav.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/main/mod_dav.c (original)
+++ httpd/httpd/trunk/modules/dav/main/mod_dav.c Tue Aug  3 19:45:21 2010
@@ -1984,7 +1984,6 @@ static int dav_method_propfind(request_r
     dav_error *err;
     int result;
     apr_xml_doc *doc;
-    const apr_xml_elem *child;
     dav_walker_ctx ctx = { { 0 } };
     dav_response *multi_status;
 
@@ -2035,15 +2034,14 @@ static int dav_method_propfind(request_r
 
     /* ### validate that only one of these three elements is present */
 
-    if (doc == NULL
-        || (child = dav_find_child(doc->root, "allprop")) != NULL) {
+    if (doc == NULL || dav_find_child(doc->root, "allprop") != NULL) {
         /* note: no request body implies allprop */
         ctx.propfind_type = DAV_PROPFIND_IS_ALLPROP;
     }
-    else if ((child = dav_find_child(doc->root, "propname")) != NULL) {
+    else if (dav_find_child(doc->root, "propname") != NULL) {
         ctx.propfind_type = DAV_PROPFIND_IS_PROPNAME;
     }
-    else if ((child = dav_find_child(doc->root, "prop")) != NULL) {
+    else if (dav_find_child(doc->root, "prop") != NULL) {
         ctx.propfind_type = DAV_PROPFIND_IS_PROP;
     }
     else {

Modified: httpd/httpd/trunk/modules/filters/mod_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_filter.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_filter.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_filter.c Tue Aug  3 19:45:21 2010
@@ -133,16 +133,16 @@ static int filter_init(ap_filter_t *f)
 static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
 {
     ap_filter_provider_t *provider;
-    const char *str = NULL;
-    char *str1;
     int match;
     int err = 0;
     unsigned int proto_flags;
     request_rec *r = f->r;
     harness_ctx *ctx = f->ctx;
     provider_ctx *pctx;
+#ifndef NO_PROTOCOL
     mod_filter_ctx *rctx = ap_get_module_config(r->request_config,
                                                 &filter_module);
+#endif
 
     /* Check registered providers in order */
     for (provider = filter->providers; provider; provider = provider->next) {
@@ -178,9 +178,10 @@ static int filter_lookup(ap_filter_t *f,
                 }
 
                 if (proto_flags & AP_FILTER_PROTO_TRANSFORM) {
-                    str = apr_table_get(r->headers_out, "Cache-Control");
+                    const char *str = apr_table_get(r->headers_out,
+                                                    "Cache-Control");
                     if (str) {
-                        str1 = apr_pstrdup(r->pool, str);
+                        char *str1 = apr_pstrdup(r->pool, str);
                         ap_str_tolower(str1);
                         if (strstr(str1, "no-transform")) {
                             /* can't use this provider; try next */
@@ -235,8 +236,10 @@ static int filter_lookup(ap_filter_t *f,
 static apr_status_t filter_harness(ap_filter_t *f, apr_bucket_brigade *bb)
 {
     apr_status_t ret;
+#ifndef NO_PROTOCOL
     const char *cachecontrol;
     char *str;
+#endif
     harness_ctx *ctx = f->ctx;
     ap_filter_rec_t *filter = f->frec;
 

Modified: httpd/httpd/trunk/modules/filters/mod_include.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_include.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_include.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_include.c Tue Aug  3 19:45:21 2010
@@ -3069,10 +3069,6 @@ static apr_status_t includes_filter(ap_f
 
 static int include_fixup(request_rec *r)
 {
-    include_dir_config *conf;
-
-    conf = ap_get_module_config(r->per_dir_config, &include_module);
-
     if (r->handler && (strcmp(r->handler, "server-parsed") == 0))
     {
         if (!r->content_type || !*r->content_type) {
@@ -3088,6 +3084,9 @@ static int include_fixup(request_rec *r)
     }
 #else
     {
+        include_dir_config *conf = ap_get_module_config(r->per_dir_config,
+                                                        &include_module);
+
         if (conf->xbithack == XBITHACK_OFF) {
             return DECLINED;
         }

Modified: httpd/httpd/trunk/modules/filters/regexp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/regexp.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/regexp.c (original)
+++ httpd/httpd/trunk/modules/filters/regexp.c Tue Aug  3 19:45:21 2010
@@ -142,7 +142,6 @@ char *sed_compile(sed_commands_t *comman
     int lc;
     int i, cflg;
     int iflag; /* used for non-ascii characters in brackets */
-    int nodelim = 0;
     char *sp = commands->cp;
     int regerrno = 0;
 
@@ -150,7 +149,6 @@ char *sed_compile(sed_commands_t *comman
     if ((c = GETC()) == eof || c == '\n') {
         if (c == '\n') {
             UNGETC(c);
-            nodelim = 1;
         }
         commands->cp = sp;
         goto out;

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c Tue Aug  3 19:45:21 2010
@@ -517,7 +517,6 @@ static void dump_header_to_log(request_r
 
     while (posn < length) {
         unsigned char c = fheader[posn]; 
-        char hexval[3];
 
         if (i >= 20) {
             i = 0;

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=982016&r1=982015&r2=982016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Tue Aug  3 19:45:21 2010
@@ -59,10 +59,11 @@ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(prox
 /* already called in the knowledge that the characters are hex digits */
 PROXY_DECLARE(int) ap_proxy_hex2c(const char *x)
 {
-    int i, ch;
+    int i;
 
 #if !APR_CHARSET_EBCDIC
-    ch = x[0];
+    int ch = x[0];
+
     if (apr_isdigit(ch)) {
         i = ch - '0';
     }



Mime
View raw message