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

Re: svn commit: r1182130 - in /subversion/trunk/subversion: libsvn_delta/compat.c libsvn_subr/svn_mutex.c

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Tue, 11 Oct 2011 18:03:23 -0500

On Tue, Oct 11, 2011 at 5:37 PM, <stsp_at_apache.org> wrote:
> Author: stsp
> Date: Tue Oct 11 22:37:28 2011
> New Revision: 1182130
>
> URL: http://svn.apache.org/viewvc?rev=1182130&view=rev
> Log:
> Some compiler-warning-driven house-keeping.
>
> * subversion/libsvn_subr/svn_mutex.c
>  (uninit): Rename to ...
>  (destroy_mutex): ... this more obvious name. Also wrap inside APR_HAS_THREADS
>   to avoid "defined but not used" warnings in non-threaded builds.
>  (svn_mutex__init): Track above function rename.
>
> * subversion/libsvn_delta/compat.c
>  (ev2_close_directory, ev2_absent_directory, ev2_apply_textdelta,
>   ev2_close_file, ev2_absent_file, complete_cb): Remove a bunch of unused
>    local variables.

Could you please bring these back? If the warnings bother you, feel
free to comment them out after resurrection.

Thanks,
-Hyrum

>
> Modified:
>    subversion/trunk/subversion/libsvn_delta/compat.c
>    subversion/trunk/subversion/libsvn_subr/svn_mutex.c
>
> Modified: subversion/trunk/subversion/libsvn_delta/compat.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1182130&r1=1182129&r2=1182130&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_delta/compat.c (original)
> +++ subversion/trunk/subversion/libsvn_delta/compat.c Tue Oct 11 22:37:28 2011
> @@ -338,8 +338,6 @@ static svn_error_t *
>  ev2_close_directory(void *dir_baton,
>                     apr_pool_t *scratch_pool)
>  {
> -  struct ev2_dir_baton *db = dir_baton;
> -
>   return SVN_NO_ERROR;
>  }
>
> @@ -348,7 +346,6 @@ ev2_absent_directory(const char *path,
>                      void *parent_baton,
>                      apr_pool_t *scratch_pool)
>  {
> -  struct ev2_dir_baton *pb = parent_baton;
>   return SVN_NO_ERROR;
>  }
>
> @@ -400,8 +397,6 @@ ev2_apply_textdelta(void *file_baton,
>                     svn_txdelta_window_handler_t *handler,
>                     void **handler_baton)
>  {
> -  struct ev2_file_baton *fb = file_baton;
> -
>   *handler_baton = NULL;
>   *handler = svn_delta_noop_window_handler;
>   return SVN_NO_ERROR;
> @@ -429,7 +424,6 @@ ev2_close_file(void *file_baton,
>                const char *text_checksum,
>                apr_pool_t *scratch_pool)
>  {
> -  struct ev2_file_baton *fb = file_baton;
>   return SVN_NO_ERROR;
>  }
>
> @@ -438,7 +432,6 @@ ev2_absent_file(const char *path,
>                 void *parent_baton,
>                 apr_pool_t *scratch_pool)
>  {
> -  struct ev2_dir_baton *pb = parent_baton;
>   return SVN_NO_ERROR;
>  }
>
> @@ -855,9 +848,6 @@ complete_cb(void *baton,
>
>   for (i = 0; i < sorted_hash->nelts; i++)
>     {
> -      svn_sort__item_t *item = &APR_ARRAY_IDX(sorted_hash, i, svn_sort__item_t);
> -      const char *path = item->key;
> -
>       /* ### We should actually do something here, but for now... */
>     }
>
>
> Modified: subversion/trunk/subversion/libsvn_subr/svn_mutex.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/svn_mutex.c?rev=1182130&r1=1182129&r2=1182130&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/svn_mutex.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/svn_mutex.c Tue Oct 11 22:37:28 2011
> @@ -24,14 +24,17 @@
>  #include "svn_private_config.h"
>  #include "private/svn_mutex.h"
>
> +#if APR_HAS_THREADS
>  /* Destructor to be called as part of the pool cleanup procedure. */
> -static apr_status_t uninit(void *data)
> +static apr_status_t
> +destroy_mutex(void *data)
>  {
>   svn_mutex__t **mutex_p = data;
>   *mutex_p = NULL;
>
>   return APR_SUCCESS;
>  }
> +#endif
>
>  svn_error_t *
>  svn_mutex__init(svn_mutex__t **mutex_p,
> @@ -51,7 +54,8 @@ svn_mutex__init(svn_mutex__t **mutex_p,
>         return svn_error_wrap_apr(status, _("Can't create mutex"));
>
>       *mutex_p = apr_mutex;
> -      apr_pool_cleanup_register(pool, mutex_p, uninit, apr_pool_cleanup_null);
> +      apr_pool_cleanup_register(pool, mutex_p, destroy_mutex,
> +                                apr_pool_cleanup_null);
>     }
>  #else
>   if (enable_mutex)
>
>
>

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2011-10-12 01:03:56 CEST

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