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

warning in swigutil_py.c

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2003-05-23 02:24:49 CEST

so i was playing with the new and more pythonic swig bindings, and i
noticed a warning in the c wrapper code.

subversion/bindings/swig/swigutil_py.c: In function
`svn_swig_py_make_file':
subversion/bindings/swig/swigutil_py.c:900: warning: cast to pointer
from integer of different size

looking at the code, it appears that we're using fileno (which returns
an integer), and casting it to an apr_os_file_t *. now apr_os_file_t
is defined as an integer on this platform, so shouldn't we be doing
something like:

apr_os_file_t fd;

fd = fileno (file);

then using &fd when we need a pointer to the apr_os_file_t *?

I realize there is a comment for that function stating that it's
broken, but is this the 'brokenness' that it's talking about, and if so
is this what we should be doing?

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 23 02:25:37 2003

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.