On Feb 18, 2010, at 2:41 PM, Philip Martin wrote: > hwri...@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