[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix compiler warnings

From: <kfogel_at_newton.ch.collab.net>
Date: 2003-01-21 20:30:32 CET

Justin Erenkrantz jerenkrantz@apache.org writes:
 This patch removes a bunch of compiler warnings seen with Sun Forte.
 Besides one 'statement not reachable' warning, the rest are
 signed/unsigned conflicts. The real root of this stems from the fact
 that apr_md5_* only deals with unsigned char*'s while everything else
 in SVN only deals with char*s. (Does GCC ignore these warnings?)
 
 Perhaps the bigger question is whether to somehow fix the apr_md5_*
 API to take char*'s instead? I'm sort of on the fence here. Before
 starting what will most likely be a painful discussion on dev@apr,
 I'd like to see what you guys (namely Karl since he wrote most of the
 checksum code that uses MD5) think first. What makes more sense?

I have to admit, it makes more sense to me to fix APR. I mean, most
callers are probably passing signed 'char *' data. If APR's md5 code
internally needs to treat it as unsigned, for the purpose of the
digest update algorith, it should just cast.

No, I never saw any warnings about it, not from GCC 2.96 anyway.

Justin, would you be willing to have that discussion on dev@apr? I'll
bet most callers are either casting, or not doing anything because
they're compilers aren't warning them anyway... But I haven't looked
at (say) httpd.

(For those who didn't see the patch, note that we're not talking about
the retured digest here, but about the input data -- normally some C
string buffer. The digest is always unsigned, of course.)

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:04:32 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.