Merge pull request #2632 from marcinwyszynski/master

Avoid implicit conversions in Ruby extension code
pull/2255/merge
Michael Lumish 9 years ago
commit d116a2d3a9
  1. 4
      src/ruby/ext/grpc/rb_call.c
  2. 2
      src/ruby/ext/grpc/rb_grpc.c

@ -235,8 +235,8 @@ static VALUE grpc_rb_call_set_metadata(VALUE self, VALUE metadata) {
*/
static int grpc_rb_md_ary_fill_hash_cb(VALUE key, VALUE val, VALUE md_ary_obj) {
grpc_metadata_array *md_ary = NULL;
int array_length;
int i;
long array_length;
long i;
/* Construct a metadata object from key and value and add it */
TypedData_Get_Struct(md_ary_obj, grpc_metadata_array,

@ -139,7 +139,7 @@ gpr_timespec grpc_rb_time_timeval(VALUE time, int interval) {
rb_raise(rb_eRangeError, "%f out of Time range",
RFLOAT_VALUE(time));
}
t.tv_nsec = (time_t)(d * 1e9 + 0.5);
t.tv_nsec = (int)(d * 1e9 + 0.5);
}
break;

Loading…
Cancel
Save