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

Re: svn commit: r1459058 - in /subversion/trunk/subversion: include/private/svn_dep_compat.h include/private/svn_subr_private.h libsvn_ra_serf/serf.c libsvn_subr/hash.c libsvn_wc/adm_ops.c svn/notify.c svnrdump/dump_editor.c

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 21 Mar 2013 15:24:29 +0000 (GMT)

Branko Čibej wrote:

> On 21.03.2013 14:18, Philip Martin wrote:
>> julianfoad_at_apache.org writes:
>>> -svn_error_t *
>>> -svn_hash__clear(apr_hash_t *hash, apr_pool_t *pool)
>>> +void
>>> +svn_hash__clear(apr_hash_t *hash)
>>>   {
>>>   #if APR_VERSION_AT_LEAST(1, 3, 0)
>>>     apr_hash_clear(hash);
>>> @@ -518,13 +518,12 @@ svn_hash__clear(apr_hash_t *hash, apr_po
>>>     const void *key;
>>>     apr_ssize_t klen;
>>>  
>>> -  for (hi = apr_hash_first(pool, hash); hi; hi = apr_hash_next(hi))
>>> +  for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi))
>>>       {
>>>         apr_hash_this(hi, &key, &klen, NULL);
>>>         apr_hash_set(hash, key, klen, NULL);
>>>       }
>>>   #endif
>>> -  return SVN_NO_ERROR;
>>>   }
>>>  
>> The declaration of svn_hash__clear is only present for old APR while the
>> definition is always visible.  I get this warning:
>>
>> ../src2/subversion/libsvn_subr/hash.c:512:1: warning: no previous prototype
>> for 'svn_hash__clear' [-Wmissing-prototypes]
>>
>> We could fix it by moving the declaration outside the #if making
>> svn_hash__clear always available.  Or we could wrap the definition in a
>> #if (dropping the call to apr_hash_clear) so it is only available when
>> the declaration is available.
>>
>> Which is the best solution?
>
> Given that this is an internal API and not subject to compatibility
> across patch releases, I think we can safely make the implementation
> conditional on the same predicate.

Sounds right to me too.  I'll make it so (despite cmpilato's commit in the opposite direction a few minutes ago) unless anyone very soon disagrees.

- Julian
Received on 2013-03-21 16:25:09 CET

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