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

Re: svn commit: r8490 - trunk/subversion/mod_dav_svn

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-01-25 21:24:45 CET

Philip Martin wrote:

>cmpilato@tigris.org writes:
>
>
>
>>Author: cmpilato
>>Date: Sat Jan 24 10:28:52 2004
>>New Revision: 8490
>>
>>Modified:
>> trunk/subversion/mod_dav_svn/activity.c
>> trunk/subversion/mod_dav_svn/dav_svn.h
>> trunk/subversion/mod_dav_svn/deadprops.c
>> trunk/subversion/mod_dav_svn/log.c
>> trunk/subversion/mod_dav_svn/merge.c
>> trunk/subversion/mod_dav_svn/repos.c
>> trunk/subversion/mod_dav_svn/update.c
>> trunk/subversion/mod_dav_svn/util.c
>> trunk/subversion/mod_dav_svn/version.c
>>Log:
>>Make dav_svn_convert_err() completely consume its svn_error_t * input.
>>
>>
>
>
>
>>Modified: trunk/subversion/mod_dav_svn/util.c
>>==============================================================================
>>--- trunk/subversion/mod_dav_svn/util.c (original)
>>+++ trunk/subversion/mod_dav_svn/util.c Sat Jan 24 10:28:52 2004
>>@@ -28,7 +28,7 @@
>>
>>
>> dav_error * dav_svn_convert_err(const svn_error_t *serr, int status,
>>- const char *message)
>>+ const char *message, apr_pool_t *pool)
>> {
>> dav_error *derr;
>>
>>@@ -51,13 +51,17 @@
>> /* add other mappings here */
>> }
>>
>>- derr = dav_new_error_tag(serr->pool, status,
>>- serr->apr_err, serr->message,
>>+ derr = dav_new_error_tag(pool, status,
>>+ serr->apr_err, apr_pstrdup(pool, serr->message),
>> SVN_DAV_ERROR_NAMESPACE,
>> SVN_DAV_ERROR_TAG);
>> if (message != NULL)
>>- derr = dav_push_error(serr->pool, status, serr->apr_err,
>>+ derr = dav_push_error(pool, status, serr->apr_err,
>> message, derr);
>>+
>>+ /* Now, destroy the Subversion error. */
>>+ svn_error_clear(serr);
>>
>>
>
>/home/pm/sw/subversion/svn/subversion/mod_dav_svn/util.c: In function `dav_svn_convert_err':
>/home/pm/sw/subversion/svn/subversion/mod_dav_svn/util.c:63: warning: passing arg 1 of `svn_error_clear' discards qualifiers from pointer target type
>
>If you want to pass the error as "const svn_error_t *" then I suggest
>you change svn_error_clear as well.
>
>
And I suggest not passing a const svn_error_t* to a function that
modifies (destroys, that is) the object it points to.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 25 21:25:25 2004

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.