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

Re: svn commit: r911370 - /subversion/trunk/subversion/libsvn_wc/workqueue.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 18 Feb 2010 14:41:40 +0000

hwright_at_apache.org writes:

> Author: hwright
> Date: Thu Feb 18 12:49:20 2010
> New Revision: 911370
>
> URL: http://svn.apache.org/viewvc?rev=911370&view=rev
> Log:
> * subversion/libsvn_wc/workqueue.c
> (run_delete): Do a bunch of casts, to get rid of a few warnings on 64-bit
> platforms.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/workqueue.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=911370&r1=911369&r2=911370&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/workqueue.c Thu Feb 18 12:49:20 2010
> @@ -1735,15 +1735,15 @@
>
> local_abspath = apr_pstrmemdup(scratch_pool, arg->data, arg->len);
> arg = arg->next;
> - kind = svn_skel__parse_int(arg, scratch_pool);
> + kind = (svn_wc__db_kind_t) svn_skel__parse_int(arg, scratch_pool);

Now I get:

../src/subversion/libsvn_wc/workqueue.c: In function ‘run_delete’:
../src/subversion/libsvn_wc/workqueue.c:1738: warning: cast from function call of type ‘apr_int64_t’ to non-matching type ‘enum <anonymous>’

I tried changing:

  typedef enum {
    ...
  } svn_wc__db_kind_t;

to

  typedef enum svn_wc__db_kind_t {
    ...
  } svn_wc__db_kind_t;

but it didn't help:

../src/subversion/libsvn_wc/workqueue.c: In function ‘run_delete’:
../src/subversion/libsvn_wc/workqueue.c:1738: warning: cast from function call of type ‘apr_int64_t’ to non-matching type ‘enum svn_wc__db_kind_t’

I think we need:

  kind = (int) svn_skel__parse_int(arg, scratch_pool);

which is warning-free on my machine (as was the code without the cast).

-- 
Philip
Received on 2010-02-18 15:42:23 CET

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