[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: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Thu, 18 Feb 2010 14:44:04 +0000

On Feb 18, 2010, at 2:41 PM, Philip Martin wrote:

> 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).

The code with the new cast compiles warning-free on my box as well.

-Hyrum
Received on 2010-02-18 15:44:47 CET

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.