On 03.03.2015 21:28, julianfoad_at_apache.org wrote:
> Author: julianfoad
> Date: Tue Mar 3 20:28:30 2015
> New Revision: 1663780
>
> URL: http://svn.apache.org/r1663780
> Log:
> * subversion/include/svn_hash.h
> (svn_hash__gets): Remove #if from prototype to match definition.
>
> Modified:
> subversion/trunk/subversion/include/svn_hash.h
>
> Modified: subversion/trunk/subversion/include/svn_hash.h
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_hash.h?rev=1663780&r1=1663779&r2=1663780&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/include/svn_hash.h (original)
> +++ subversion/trunk/subversion/include/svn_hash.h Tue Mar 3 20:28:30 2015
> @@ -239,7 +239,6 @@ svn_hash_from_cstring_keys(apr_hash_t **
> const apr_array_header_t *keys,
> apr_pool_t *pool);
>
> -#ifdef SVN_DEBUG
> /* In debug builds, the svn_hash_gets macro forwards the parameters
> * through this function in order to have parameter type checking,
> * particularly for the key. The svn_hash_sets macro gets parameter
> @@ -247,7 +246,6 @@ svn_hash_from_cstring_keys(apr_hash_t **
> */
> void *
> svn_hash__gets(apr_hash_t *ht, const char *key);
> -#endif
No, that's wrong. The should not be available in non-SVN_DEBUG mode
because nobody should be calling svn_hash__gets directly. All calls
should come from the expansion of the svn_hash_gets macro, which only
expands to the call in SVN_DEBUG mode.
The problem with the "missing prototype" warning should be solved in the
same way we solve it for error tracing (see the definition of
SVN_ERR__TRACING in svn_error.h and how it's used in libsvn_subr/error.c).
-- Brane
Received on 2015-03-04 09:21:03 CET