Joe Orton wrote:
On Wed, Sep 22, 2004 at 06:21:31PM -0000, [EMAIL PROTECTED] wrote:
 --- core.c     20 Sep 2004 20:12:20 -0000      1.286
 +++ core.c     22 Sep 2004 18:21:29 -0000      1.287
 @@ -2298,7 +2298,7 @@

 -    cmd->server->pathlen = strlen(arg);
 +    cmd->server->pathlen = (int)strlen(arg);

It would surely be better to make pathlen an apr_size_t than add casts
like this.  Did you try that?

This question is going to come up again so it's good to get agreement before I make many more commits. The IA64 Windows httpd build spits out a large number of warnings, over 500, and a fair number of these come from int/size_t mismatches. Apparently other 64 bit compilers aren't as picky as the MS compiler, since I haven't seen anyone else complaining about this. They seem to reasonably assume that we aren't going to have strings >4Gig long.

The general approach I have been taking is changing locally declared
int's to apr_size_t where feasible but I have avoided changing int's
to apr_size_t in public structures.

Changing public structures may ripple through other code
and brings up concerns about MMN bumps. In this case we
would incur a major bump I believe. Unless a particular
field is resulting in warnings in multiple parts of the code
I'm generally going to opt for the cast.

Sound reasonable?

BTW, if you commit stuff to both httpd and apr at the same time the CVS
commit notifications don't go to all the right places, so it's best to
do each separately.

I noticed that after I committed, next time I'll split the commit.

Thanks, Allan



Reply via email to