You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Bill Stoddard <st...@locus.apache.org> on 2000/07/06 16:40:38 UTC
cvs commit: apache-2.0/src/modules/standard mod_include.c
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) {
return 1;
}
*d++ = ap_tolower(c);
@@ -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;
memcpy(next, expansion, l);
next += l;
break;
Re: cvs commit: apache-2.0/src/modules/standard mod_include.c
Posted by Sascha Schumann <sa...@schumann.cx>.
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