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

[patch] Cast to time_t in swigutil_rb.c to remove compiler warning

From: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-04-22 23:31:07 CEST

I'm trying to reduce the noise when building the Ruby bindings. So I
don't get too used to so many warnings.

Deal with compiler warning for narrowing conversion

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
(svn_swig_rb_svn_date_string_to_time): Cast the seconds and microseconds
pieces of apr_time_t to time_t before sending to rb_time_new

Index: subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
--- subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
(revision 24695)
+++ subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (working copy)
@@ -819,7 +819,7 @@
     if (error)
- return rb_time_new(apr_time_sec(tm), apr_time_usec(tm));
+ return rb_time_new((time_t)apr_time_sec(tm), (time_t)apr_time_usec(tm));
   } else {
     return Qnil;

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 22 23:31:14 2007

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.