You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Sascha Schumann <sa...@schumann.cx> on 2000/07/07 03:50:15 UTC

Re: cvs commit: apache-2.0/src/modules/standard mod_include.c

On Thu, 6 Jul 2000, Bill Stoddard wrote:

> stoddard    00/07/06 07:40:37
> 
>   Modified:    src/modules/standard mod_include.c
>   Log:
>   Eliminate a couple of compiler warnings. I don't like casts but these
>   seem safe.
>   
>   Revision  Changes    Path
>   1.44      +2 -2      apache-2.0/src/modules/standard/mod_include.c
>   
>   Index: mod_include.c
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
>   retrieving revision 1.43
>   retrieving revision 1.44
>   diff -u -r1.43 -r1.44
>   --- mod_include.c	2000/06/28 14:33:41	1.43
>   +++ mod_include.c	2000/07/06 14:40:36	1.44
>   @@ -475,7 +475,7 @@
>        }
>        /* now get directive */
>        while (1) {
>   -	if (d - dest == len) {
>   +	if (d - dest == (int)len) {

If d and dest are pointers, you probably should cast to ptrdiff_t instead
of int for 64-bit correctness.

>   @@ -572,7 +572,7 @@
>    		    /* zero-length variable name causes just the $ to be copied */
>    		    l = 1;
>    		}
>   -		l = (l > end_out - next) ? (end_out - next) : l;
>   +		l = ((int)l > end_out - next) ? (end_out - next) : l;

Same here.

- Sascha