You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@hyperreal.org on 1998/04/01 16:24:38 UTC

cvs commit: apache-1.3/src/modules/standard mod_cgi.c mod_include.c mod_rewrite.c mod_userdir.c

martin      98/04/01 06:24:37

  Modified:    src/main  http_main.c http_request.c
               src/modules/standard  mod_cgi.c mod_include.c mod_rewrite.c
                        mod_userdir.c
  Log:
  Remove unreferenced variables
  
  Revision  Changes    Path
  1.318     +2 -3      apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.317
  retrieving revision 1.318
  diff -u -u -r1.317 -r1.318
  --- http_main.c	1998/03/31 12:52:44	1.317
  +++ http_main.c	1998/04/01 14:24:30	1.318
  @@ -1138,7 +1138,7 @@
       char dummybuf[2048];
       struct timeval tv;
       fd_set lfds, fds_read, fds_err;
  -    int select_rv = 0, read_rv = 0;
  +    int select_rv = 0;
       int lsd;
   
       /* Prevent a slow-drip client from holding us here indefinitely */
  @@ -1188,7 +1188,6 @@
   	 */
   	tv.tv_sec = 2;
   	tv.tv_usec = 0;
  -	read_rv = 0;
   	fds_read = lfds;
   	fds_err = lfds;
   
  @@ -1196,7 +1195,7 @@
       } while ((select_rv > 0) &&	/* Something to see on socket    */
   	     !FD_ISSET(lsd, &fds_err) &&	/* that isn't an error condition */
   	     FD_ISSET(lsd, &fds_read) &&	/* and is worth trying to read   */
  -	     ((read_rv = read(lsd, dummybuf, sizeof dummybuf)) > 0));
  +	     (read(lsd, dummybuf, sizeof dummybuf) > 0));
   
       /* Should now have seen final ack.  Safe to finally kill socket */
   
  
  
  
  1.117     +3 -5      apache-1.3/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v
  retrieving revision 1.116
  retrieving revision 1.117
  diff -u -u -r1.116 -r1.117
  --- http_request.c	1998/03/31 12:52:46	1.116
  +++ http_request.c	1998/04/01 14:24:31	1.117
  @@ -571,7 +571,7 @@
       core_dir_config *conf = get_module_config(r->per_dir_config, &core_module);
       void *per_dir_defaults = r->per_dir_config;
       void **file = (void **) conf->sec->elts;
  -    int len, num_files = conf->sec->nelts;
  +    int num_files = conf->sec->nelts;
       char *test_file;
   
       /* get the basename */
  @@ -602,8 +602,6 @@
                            get_module_config(entry_config, &core_module);
               entry_file = entry_core->d;
   
  -            len = strlen(entry_file);
  -
               this_conf = NULL;
   
               if (entry_core->r) {
  @@ -1220,6 +1218,8 @@
        * setting header_only, etc., here.
        */
   
  +    new->method          = r->method;
  +    new->method_number   = r->method_number;
       parse_uri(new, new_uri);
       new->request_config = create_request_config(r->pool);
       new->per_dir_config = r->server->lookup_defaults;
  @@ -1231,8 +1231,6 @@
   
       new->the_request = r->the_request;
   
  -    new->method          = r->method;
  -    new->method_number   = r->method_number;
       new->allowed         = r->allowed;
   
       new->status          = r->status;
  
  
  
  1.73      +2 -4      apache-1.3/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -u -r1.72 -r1.73
  --- mod_cgi.c	1998/03/31 12:53:10	1.72
  +++ mod_cgi.c	1998/04/01 14:24:33	1.73
  @@ -358,7 +358,6 @@
       (cgi_server_conf *) get_module_config(sconf, &cgi_module);
   
       struct cgi_child_stuff cld;
  -    pid_t child_pid;
   
       if (r->method_number == M_OPTIONS) {
   	/* 99 out of 100 CGI scripts, this is all they support */
  @@ -427,11 +426,10 @@
        * waiting for free_proc_chain to cleanup in the middle of an
        * SSI request -djg
        */
  -    if (!(child_pid =
  -	  spawn_child_err_buff(r->main ? r->main->pool : r->pool, cgi_child,
  +    if (!spawn_child_err_buff(r->main ? r->main->pool : r->pool, cgi_child,
   			            (void *) &cld,
   			       kill_after_timeout,
  -			       &script_out, &script_in, &script_err))) {
  +			       &script_out, &script_in, &script_err)) {
   	aplog_error(APLOG_MARK, APLOG_ERR, r->server,
   		    "couldn't spawn child process: %s", r->filename);
   	return SERVER_ERROR;
  
  
  
  1.80      +2 -4      apache-1.3/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_include.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -u -r1.79 -r1.80
  --- mod_include.c	1998/03/31 12:53:14	1.79
  +++ mod_include.c	1998/04/01 14:24:34	1.80
  @@ -1940,9 +1940,8 @@
                          int *conditional_status, int *printing)
   {
       char tag[MAX_STRING_LEN];
  -    char *tag_val;
   
  -    if (!(tag_val = get_tag(r->pool, in, tag, sizeof(tag), 1))) {
  +    if (!get_tag(r->pool, in, tag, sizeof(tag), 1)) {
           return 1;
       }
       else if (!strcmp(tag, "done")) {
  @@ -1969,9 +1968,8 @@
                           int *conditional_status, int *printing)
   {
       char tag[MAX_STRING_LEN];
  -    char *tag_val;
   
  -    if (!(tag_val = get_tag(r->pool, in, tag, sizeof(tag), 1))) {
  +    if (!get_tag(r->pool, in, tag, sizeof(tag), 1)) {
           return 1;
       }
       else if (!strcmp(tag, "done")) {
  
  
  
  1.99      +0 -4      apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -u -r1.98 -r1.99
  --- mod_rewrite.c	1998/03/31 12:53:19	1.98
  +++ mod_rewrite.c	1998/04/01 14:24:35	1.99
  @@ -1630,7 +1630,6 @@
   {
       char *uri;
       char *output;
  -    int flags;
       char newuri[MAX_STRING_LEN];
       char env[MAX_STRING_LEN];
       regex_t *regexp;
  @@ -1651,7 +1650,6 @@
       uri     = r->filename;
       regexp  = p->regexp;
       output  = p->output;
  -    flags   = p->flags;
   
       /*
        *  Add (perhaps splitted away) PATH_INFO postfix to URL to
  @@ -3111,7 +3109,6 @@
   static void run_rewritemap_programs(server_rec *s, pool *p)
   {
       rewrite_server_conf *conf;
  -    char *fname;
       FILE *fpin;
       FILE *fpout;
       array_header *rewritemaps;
  @@ -3139,7 +3136,6 @@
               || map->fpin  != -1
               || map->fpout != -1        )
               continue;
  -        fname = server_root_relative(p, map->datafile);
           fpin  = NULL;
           fpout = NULL;
           rc = spawn_child(p, rewritemap_program_child, (void *)map->datafile,
  
  
  
  1.34      +0 -3      apache-1.3/src/modules/standard/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_userdir.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -u -r1.33 -r1.34
  --- mod_userdir.c	1998/03/31 12:53:24	1.33
  +++ mod_userdir.c	1998/04/01 14:24:36	1.34
  @@ -137,13 +137,11 @@
           *usernames = arg;
       char *kw = getword_conf(cmd->pool, &usernames);
       table *usertable;
  -    int optype = O_DEFAULT;
   
       /*
        * Let's do the comparisons once.
        */
       if ((!strcasecmp(kw, "disable")) || (!strcasecmp(kw, "disabled"))) {
  -        optype = O_DISABLE;
           /*
            * If there are no usernames specified, this is a global disable - we
            * need do no more at this point than record the fact.
  @@ -163,7 +161,6 @@
           if (strlen(usernames) == 0) {
               return "UserDir \"enable\" keyword requires a list of usernames";
           }
  -        optype = O_ENABLE;
           usertable = s_cfg->enabled_users;
       }
       else {