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

Re: svn commit: r1100704 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Mon, 9 May 2011 09:32:03 -0500

On Sun, May 8, 2011 at 3:34 AM, <rhuijben_at_apache.org> wrote:
> Author: rhuijben
> Date: Sun May  8 08:34:56 2011
> New Revision: 1100704
>
> URL: http://svn.apache.org/viewvc?rev=1100704&view=rev
> Log:
> * subversion/libsvn_wc/wc_db.c
>  (scan_addition_txn,
>   wclock_obtain_cb,
>   svn_wc__db_wclock_obtain,
>   svn_wc__db_wclock_release): Following up on r1100353, resolve a few
>     warnings.
>
> Modified:
>    subversion/trunk/subversion/libsvn_wc/wc_db.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1100704&r1=1100703&r2=1100704&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Sun May  8 08:34:56 2011
> @@ -8167,7 +8167,7 @@ scan_addition_txn(void *baton,
>     op_depth = svn_sqlite__column_int64(stmt, 0);
>     current_relpath = local_relpath;
>
> -    for (i = relpath_depth(local_relpath); i > op_depth; --i)
> +    for (i = (int)relpath_depth(local_relpath); i > op_depth; --i)
>       {
>         /* Calculate the path of the operation root */
>         repos_prefix_path =
> @@ -8265,7 +8265,7 @@ scan_addition_txn(void *baton,
>         op_depth = svn_sqlite__column_int64(stmt, 0);
>
>         /* Skip to op_depth */
> -        for (i = relpath_depth(current_relpath); i > op_depth; i--)
> +        for (i = (int)relpath_depth(current_relpath); i > op_depth; i--)
>           {
>             /* Calculate the path of the operation root */
>             repos_prefix_path =
> @@ -9570,7 +9570,7 @@ wclock_obtain_cb(void *baton,
>   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, STMT_FIND_WC_LOCK));
>   SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, filter));
>
> -  lock_depth = relpath_depth(local_relpath);
> +  lock_depth = (int)relpath_depth(local_relpath);
>   max_depth = lock_depth + bt->levels_to_lock;
>
>   SVN_ERR(svn_sqlite__step(&got_row, stmt));
> @@ -9641,7 +9641,7 @@ wclock_obtain_cb(void *baton,
>         {
>           int levels = svn_sqlite__column_int(stmt, 0);
>           if (levels >= 0)
> -            levels += relpath_depth(lock_relpath);
> +            levels += (int)relpath_depth(lock_relpath);
>
>           SVN_ERR(svn_sqlite__reset(stmt));
>
> @@ -9717,7 +9717,7 @@ svn_wc__db_wclock_obtain(svn_wc__db_t *d
>   if (!steal_lock)
>     {
>       int i;
> -      int depth = relpath_depth(local_relpath);
> +      int depth = (int)relpath_depth(local_relpath);
>
>       for (i = 0; i < wcroot->owned_locks->nelts; i++)
>         {
> @@ -9880,7 +9880,7 @@ wclock_owns_lock(svn_boolean_t *own_lock
>
>   *own_lock = FALSE;
>   owned_locks = wcroot->owned_locks;
> -  lock_level = relpath_depth(local_relpath);
> +  lock_level = (int)relpath_depth(local_relpath);
>
>   if (exact)
>     {

Instead of all the casting, why don't we just change the types of the
various local variables?

-Hyrum
Received on 2011-05-09 16:32:36 CEST

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.