httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apache-1.3/src/modules/standard mod_autoindex.c mod_negotiation.c
Date Thu, 12 Feb 1998 02:18:45 GMT
dgaudet     98/02/11 18:18:45

  Modified:    src/ap   ap_snprintf.c
               src/helpers dummy.c
               src/main fnmatch.c http_core.c
               src/modules/standard mod_autoindex.c mod_negotiation.c
  Log:
  Clean up gcc 2.8.0 -Wall warnings... so we don't have to deal with PRs
  about them.
  
  Revision  Changes    Path
  1.13      +2 -1      apache-1.3/src/ap/ap_snprintf.c
  
  Index: ap_snprintf.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/ap/ap_snprintf.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ap_snprintf.c	1998/01/07 16:45:56	1.12
  +++ ap_snprintf.c	1998/02/12 02:18:38	1.13
  @@ -426,7 +426,7 @@
   	return (buf);
       }
   
  -    if (format == 'f')
  +    if (format == 'f') {
   	if (decimal_point <= 0) {
   	    *s++ = '0';
   	    if (precision > 0) {
  @@ -443,6 +443,7 @@
   	    if (precision > 0 || add_dp)
   		*s++ = '.';
   	}
  +    }
       else {
   	*s++ = *p++;
   	if (precision > 0 || add_dp)
  
  
  
  1.4       +1 -1      apache-1.3/src/helpers/dummy.c
  
  Index: dummy.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/helpers/dummy.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dummy.c	1997/07/25 02:03:17	1.3
  +++ dummy.c	1998/02/12 02:18:39	1.4
  @@ -1,7 +1,7 @@
   /* this file is used by TestLib */
   int foo ( const char *c )
   {
  -return 0;
  +return *c;
   }
   int main(void) {
       const char *c = '\0';
  
  
  
  1.6       +6 -3      apache-1.3/src/main/fnmatch.c
  
  Index: fnmatch.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/fnmatch.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- fnmatch.c	1997/11/06 22:03:40	1.5
  +++ fnmatch.c	1998/02/12 02:18:40	1.6
  @@ -84,12 +84,15 @@
   		return (FNM_NOMATCH);
   
   	    /* Optimize for pattern with * at end or before /. */
  -	    if (c == EOS)
  -		if (flags & FNM_PATHNAME)
  +	    if (c == EOS) {
  +		if (flags & FNM_PATHNAME) {
   		    return (strchr(string, '/') == NULL ?
   			    0 : FNM_NOMATCH);
  -		else
  +		}
  +		else {
   		    return (0);
  +		}
  +	    }
   	    else if (c == '/' && flags & FNM_PATHNAME) {
   		if ((string = strchr(string, '/')) == NULL)
   		    return (FNM_NOMATCH);
  
  
  
  1.158     +12 -6     apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.157
  retrieving revision 1.158
  diff -u -r1.157 -r1.158
  --- http_core.c	1998/02/08 23:15:34	1.157
  +++ http_core.c	1998/02/12 02:18:41	1.158
  @@ -690,11 +690,14 @@
       const char *err = check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
       if (err != NULL) return err;
   
  -    if (!is_directory (arg))
  -	if (cmd->server->is_virtual)
  +    if (!is_directory (arg)) {
  +	if (cmd->server->is_virtual) {
   	    fprintf (stderr, "Warning: DocumentRoot [%s] does not exist\n", arg);
  -	else
  +	}
  +	else {
   	    return "DocumentRoot must be a directory";
  +	}
  +    }
       
       conf->document_root = arg;
       return NULL;
  @@ -1551,11 +1554,14 @@
   	return;
       }
   
  -    if ((str = getword_conf(cmd->pool, &arg)))
  -	if (!strcasecmp(str, "max"))
  +    if ((str = getword_conf(cmd->pool, &arg))) {
  +	if (!strcasecmp(str, "max")) {
   	    cur = limit->rlim_max;
  -	else
  +	}
  +	else {
   	    cur = atol(str);
  +	}
  +    }
       else {
   	aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, cmd->server,
   		    "Invalid parameters for %s", cmd->cmd->name);
  
  
  
  1.68      +8 -4      apache-1.3/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- mod_autoindex.c	1998/02/12 01:09:44	1.67
  +++ mod_autoindex.c	1998/02/12 02:18:43	1.68
  @@ -635,12 +635,16 @@
   		    if ((p = ind(&titlebuf[++x], '<')) != -1)
   			titlebuf[x + p] = '\0';
   		    /* Scan for line breaks for Tanmoy's secretary */
  -		    for (y = x; titlebuf[y]; y++)
  -			if ((titlebuf[y] == CR) || (titlebuf[y] == LF))
  -			    if (y == x)
  +		    for (y = x; titlebuf[y]; y++) {
  +			if ((titlebuf[y] == CR) || (titlebuf[y] == LF)) {
  +			    if (y == x) {
   				x++;
  -			    else
  +			    }
  +			    else {
   				titlebuf[y] = ' ';
  +			    }
  +			}
  +		    }
   		    pfclose(r->pool, thefile);
   		    return pstrdup(r->pool, &titlebuf[x]);
   		}
  
  
  
  1.71      +1 -1      apache-1.3/src/modules/standard/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_negotiation.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- mod_negotiation.c	1998/02/12 01:09:45	1.70
  +++ mod_negotiation.c	1998/02/12 02:18:43	1.71
  @@ -1895,7 +1895,7 @@
                   vary_by_charset = 1;
               }
           }
  -        if ((len = (long) find_content_length(neg, variant)) != 0) {
  +        if ((len = find_content_length(neg, variant)) != 0) {
               ap_snprintf(lenstr, sizeof(lenstr), "%ld", len);
               rec = pstrcat(r->pool, rec, " {length ", lenstr, "}", NULL);
           }
  
  
  

Mime
View raw message