]> granicus.if.org Git - apache/commitdiff
remove more unused variables
authorStefan Fritsch <sf@apache.org>
Tue, 3 Aug 2010 22:12:19 +0000 (22:12 +0000)
committerStefan Fritsch <sf@apache.org>
Tue, 3 Aug 2010 22:12:19 +0000 (22:12 +0000)
revove some obsolete comments

netware file is untested

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982050 13f79535-47bb-0310-9956-ffa450edef68

13 files changed:
modules/generators/mod_cgid.c
modules/slotmem/mod_slotmem_shm.c
modules/ssl/ssl_engine_io.c
modules/ssl/ssl_engine_pphrase.c
modules/ssl/ssl_engine_rand.c
server/mpm/event/event.c
server/mpm/event/fdqueue.c
server/mpm/netware/mpm_netware.c
server/mpm/prefork/prefork.c
server/mpm_common.c
server/mpm_unix.c
server/request.c
server/util_ebcdic.c

index 6c3e91deb190b535aba2dff82f87cb2adc71fc98..6e6fc0ca7f0a0177af9702c2904134c4d75da898 100644 (file)
@@ -357,14 +357,12 @@ static apr_status_t sock_writev(int fd, request_rec *r, int count, ...)
     int rc;
     struct iovec *vec;
     int i;
-    int total_bytes = 0;
 
     vec = (struct iovec *)apr_palloc(r->pool, count * sizeof(struct iovec));
     va_start(ap, count);
     for (i = 0; i < count; i++) {
         vec[i].iov_base = va_arg(ap, caddr_t);
         vec[i].iov_len  = va_arg(ap, apr_size_t);
-        total_bytes += vec[i].iov_len;
     }
     va_end(ap);
 
index e4226a6dce2080d0ae3659ea7b8005fba8f25323..92c011e9efa66dd05ecca56a4d509396c8c36361 100644 (file)
@@ -184,7 +184,6 @@ static void restore_slotmem(void *ptr, const char *name, apr_size_t size,
 static apr_status_t cleanup_slotmem(void *param)
 {
     ap_slotmem_instance_t **mem = param;
-    apr_status_t rv;
     apr_pool_t *pool = NULL;
 
     if (*mem) {
@@ -192,7 +191,7 @@ static apr_status_t cleanup_slotmem(void *param)
         pool = next->gpool;
         while (next) {
             store_slotmem(next);
-            rv = apr_shm_destroy((apr_shm_t *)next->shm);
+            apr_shm_destroy((apr_shm_t *)next->shm);
             next = next->next;
         }
         apr_pool_destroy(pool);
index 5ee27f47b176c75aad3929fc716a5168ce1acbdc..e5ac041339e07800f9ba98b4259a4a24cd798ce7 100644 (file)
@@ -1839,14 +1839,12 @@ long ssl_io_data_cb(BIO *bio, int cmd,
     SSL *ssl;
     conn_rec *c;
     server_rec *s;
-    SSLSrvConfigRec *sc;
 
     if ((ssl = (SSL *)BIO_get_callback_arg(bio)) == NULL)
         return rc;
     if ((c = (conn_rec *)SSL_get_app_data(ssl)) == NULL)
         return rc;
     s = mySrvFromConn(c);
-    sc = mySrvConfig(s);
 
     if (   cmd == (BIO_CB_WRITE|BIO_CB_RETURN)
         || cmd == (BIO_CB_READ |BIO_CB_RETURN) ) {
index c7fc5de65eb51e44bb6f32388a84c4928f9907a2..4f431c7f0dc244e8a0fc0a81d188326a0f47b1d3 100644 (file)
@@ -159,7 +159,6 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
     char *an;
     char *cp;
     apr_time_t pkey_mtime = 0;
-    int isterm = 1;
     apr_status_t rv;
     /*
      * Start with a fresh pass phrase array
@@ -419,7 +418,7 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
                  */
                 if (cpPassPhraseCur == NULL) {
                     if (nPassPhraseDialogCur && pkey_mtime &&
-                        !(isterm = isatty(fileno(stdout)))) /* XXX: apr_isatty() */
+                        !isatty(fileno(stdout))) /* XXX: apr_isatty() */
                     {
                         ap_log_error(APLOG_MARK, APLOG_ERR, 0,
                                      pServ,
index a4b7ca50bd86d2f66323384e6429b6b1a772daad..a45012a309796c0c1125fd1b37e7640d5baa2e20 100644 (file)
@@ -45,19 +45,17 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
     ssl_randseed_t *pRandSeeds;
     ssl_randseed_t *pRandSeed;
     unsigned char stackdata[256];
-    int nReq, nDone;
+    int nDone;
     apr_file_t *fp;
     int i, n, l;
 
     mc = myModConfig(s);
-    nReq  = 0;
     nDone = 0;
     apRandSeed = mc->aRandSeed;
     pRandSeeds = (ssl_randseed_t *)apRandSeed->elts;
     for (i = 0; i < apRandSeed->nelts; i++) {
         pRandSeed = &pRandSeeds[i];
         if (pRandSeed->nCtx == nCtx) {
-            nReq += pRandSeed->nBytes;
             if (pRandSeed->nSrc == SSL_RSSRC_FILE) {
                 /*
                  * seed in contents of an external file
index 371eb6620d24abba70164b9300f001e43fe6a494..df320b5667798e304ab2b11a7f32fc5eea7d9bd6 100644 (file)
@@ -1155,7 +1155,6 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                                  ap_server_conf,
                                  "event_loop: unexpected state %d",
                                  cs->state);
-                    AP_DEBUG_ASSERT(0);
                 }
 
                 apr_thread_mutex_lock(timeout_mutex);
index 10015b7d39d705f3b9b9a4772166e44f69e6b877..7d7d4d019e367ee2b31fa335b74ec2d08b47072d 100644 (file)
@@ -165,7 +165,6 @@ apr_status_t ap_queue_info_wait_for_idler(fd_queue_info_t * queue_info)
                                       queue_info->idlers_mutex);
             if (rv != APR_SUCCESS) {
                 apr_status_t rv2;
-                AP_DEBUG_ASSERT(0);
                 rv2 = apr_thread_mutex_unlock(queue_info->idlers_mutex);
                 if (rv2 != APR_SUCCESS) {
                     return rv2;
index 482509737b0f8e5d513713986029eb701484c082..0387f028fca70d70d7832c458f8ac280ceefadf2 100644 (file)
@@ -345,7 +345,6 @@ void worker_main(void *arg)
 {
     ap_listen_rec *lr, *first_lr, *last_lr = NULL;
     apr_pool_t *ptrans;
-    apr_pool_t *pbucket;
     apr_allocator_t *allocator;
     apr_bucket_alloc_t *bucket_alloc;
     conn_rec *current_conn;
@@ -617,7 +616,6 @@ static int hold_off_on_exponential_spawning;
 static void perform_idle_server_maintenance(apr_pool_t *p)
 {
     int i;
-    int to_kill;
     int idle_count;
     worker_score *ws;
     int free_length;
@@ -628,7 +626,6 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
     /* initialize the free_list */
     free_length = 0;
 
-    to_kill = -1;
     idle_count = 0;
     last_non_dead = -1;
     total_non_dead = 0;
@@ -660,13 +657,6 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
             */
             if (status <= WORKER_READY) {
                 ++ idle_count;
-                /* always kill the highest numbered child if we have to...
-                * no really well thought out reason ... other than observing
-                * the server behaviour under linux where lower numbered children
-                * tend to service more hits (and hence are more likely to have
-                * their data in cpu caches).
-                */
-                to_kill = i;
             }
 
             ++total_non_dead;
@@ -978,13 +968,10 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
 
 static int netware_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
 {
-    int debug;
     char *addrname = NULL;
 
     mpm_state = AP_MPMQ_STARTING;
 
-    debug = ap_exists_config_define("DEBUG");
-
     is_graceful = 0;
     ap_my_pid = getpid();
     addrname = getaddressspacename (NULL, NULL);
index 307e81252fb35312c9e6398039e246294e288da9..89e8f28aa728e5d89a9eaeeb52eabd503cddb66e 100644 (file)
@@ -800,7 +800,6 @@ static int hold_off_on_exponential_spawning;
 static void perform_idle_server_maintenance(apr_pool_t *p)
 {
     int i;
-    int to_kill;
     int idle_count;
     worker_score *ws;
     int free_length;
@@ -811,7 +810,6 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
     /* initialize the free_list */
     free_length = 0;
 
-    to_kill = -1;
     idle_count = 0;
     last_non_dead = -1;
     total_non_dead = 0;
@@ -839,13 +837,6 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
              */
             if (status <= SERVER_READY) {
                 ++ idle_count;
-                /* always kill the highest numbered child if we have to...
-                 * no really well thought out reason ... other than observing
-                 * the server behaviour under linux where lower numbered children
-                 * tend to service more hits (and hence are more likely to have
-                 * their data in cpu caches).
-                 */
-                to_kill = i;
             }
 
             ++total_non_dead;
index 3f80625e195a77f7f12f9a4e6cb6a07bf820de1f..56bc70c87541d5aa5ac219bd388d69c86d2d5c44 100644 (file)
@@ -264,7 +264,6 @@ int ap_coredumpdir_configured;
 const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
                                    const char *arg)
 {
-    apr_status_t rv;
     apr_finfo_t finfo;
     const char *fname;
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
@@ -277,7 +276,7 @@ const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
         return apr_pstrcat(cmd->pool, "Invalid CoreDumpDirectory path ",
                            arg, NULL);
     }
-    if ((rv = apr_stat(&finfo, fname, APR_FINFO_TYPE, cmd->pool)) != APR_SUCCESS) {
+    if (apr_stat(&finfo, fname, APR_FINFO_TYPE, cmd->pool) != APR_SUCCESS) {
         return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
                            " does not exist", NULL);
     }
index a9cde5c0bb47124994fb4e5c0d73a30d9c84efec..81abbb1a2adc835b99d97ae5e367e364d79887cc 100644 (file)
@@ -626,7 +626,6 @@ int ap_signal_server(int *exit_status, apr_pool_t *pconf)
     apr_status_t rv;
     pid_t otherpid;
     int running = 0;
-    int have_pid_file = 0;
     const char *status;
 
     *exit_status = 0;
@@ -644,7 +643,6 @@ int ap_signal_server(int *exit_status, apr_pool_t *pconf)
         status = "httpd (no pid file) not running";
     }
     else {
-        have_pid_file = 1;
         if (kill(otherpid, 0) == 0) {
             running = 1;
             status = apr_psprintf(pconf,
@@ -715,12 +713,10 @@ void ap_mpm_rewrite_args(process_rec *process)
     apr_getopt_t *opt;
     char optbuf[3];
     const char *optarg;
-    int fixed_args;
 
     mpm_new_argv = apr_array_make(process->pool, process->argc,
                                   sizeof(const char **));
     *(const char **)apr_array_push(mpm_new_argv) = process->argv[0];
-    fixed_args = mpm_new_argv->nelts;
     apr_getopt_init(&opt, process->pool, process->argc, process->argv);
     opt->errfn = NULL;
     optbuf[0] = '-';
index 7ce9b80cd4919e2aff4e25470ade4f23a1ca2f53..494099a392b5848181ac6b812bf430ce320c3430 100644 (file)
@@ -398,7 +398,6 @@ static walk_cache_t *prep_walk_cache(apr_size_t t, request_rec *r)
 static int resolve_symlink(char *d, apr_finfo_t *lfi, int opts, apr_pool_t *p)
 {
     apr_finfo_t fi;
-    int res;
     const char *savename;
 
     if (!(opts & (OPT_SYM_OWNER | OPT_SYM_LINKS))) {
@@ -410,9 +409,9 @@ static int resolve_symlink(char *d, apr_finfo_t *lfi, int opts, apr_pool_t *p)
 
     /* if OPT_SYM_OWNER is unset, we only need to check target accessible */
     if (!(opts & OPT_SYM_OWNER)) {
-        if ((res = apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME
-                                                 | APR_FINFO_LINK), p))
-                 != APR_SUCCESS) {
+        if (apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME | APR_FINFO_LINK), p)
+            != APR_SUCCESS)
+        {
             return HTTP_FORBIDDEN;
         }
 
@@ -431,15 +430,14 @@ static int resolve_symlink(char *d, apr_finfo_t *lfi, int opts, apr_pool_t *p)
      * owner of the symlink, then get the info of the target.
      */
     if (!(lfi->valid & APR_FINFO_OWNER)) {
-        if ((res = apr_stat(lfi, d,
-                            lfi->valid | APR_FINFO_LINK | APR_FINFO_OWNER, p))
-            != APR_SUCCESS) {
+        if (apr_stat(lfi, d, lfi->valid | APR_FINFO_LINK | APR_FINFO_OWNER, p)
+            != APR_SUCCESS)
+        {
             return HTTP_FORBIDDEN;
         }
     }
 
-    if ((res = apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME), p))
-        != APR_SUCCESS) {
+    if (apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME), p) != APR_SUCCESS) {
         return HTTP_FORBIDDEN;
     }
 
index dbcdfd4693a6eed089f32ec894c05967b6e67d84..df5d4fb96614c481030616d76b742db489d7f84f 100644 (file)
@@ -29,7 +29,6 @@ APLOG_USE_MODULE(core);
 apr_status_t ap_init_ebcdic(apr_pool_t *pool)
 {
     apr_status_t rv;
-    char buf[80];
 
     rv = apr_xlate_open(&ap_hdrs_to_ascii, "ISO-8859-1", APR_DEFAULT_CHARSET, pool);
     if (rv) {