Skip to content
Browse files

Fewer compilation warnings for 1.9

  • Loading branch information...
1 parent e34a922 commit 80cce5a21d5dde55b9596e245303c7f87bc028ce @abscondment committed
Showing with 5 additions and 6 deletions.
  1. +1 −1 ext/rb_cComputation.c
  2. +4 −5 ext/rb_cPriorityQueue.c
View
2 ext/rb_cComputation.c
@@ -175,7 +175,7 @@ RubyVor_nn_graph(VALUE self)
if (RARRAY_LEN(graphPtr[i]) < 1) {
/* Evaluate noNeighborResponse and respond accordingly */
if (noNeighborResponse == 1) {
- rb_raise(rb_eIndexError, "index of 0 (no neighbors) at %i", i);
+ rb_raise(rb_eIndexError, "index of 0 (no neighbors) at %li", i);
} else if (noNeighborResponse == 2) {
/* No valid triangles touched this node -- include *all* possible neighbors
*
View
9 ext/rb_cPriorityQueue.c
@@ -17,13 +17,12 @@ compare(VALUE a, VALUE b)
if (CLASS_OF(a) == rb_path2class("RubyVor::PriorityQueue::QueueItem"))
aD = NUM2DBL(rb_funcall(a, rb_intern("priority"), 0));
else
- rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)", rb_obj_classname(a), rb_path2class("RubyVor::PriorityQueue::QueueItem"));
+ rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)", rb_obj_classname(a), rb_obj_classname(rb_path2class("RubyVor::PriorityQueue::QueueItem")));
if (CLASS_OF(a) == rb_path2class("RubyVor::PriorityQueue::QueueItem"))
-
bD = NUM2DBL(rb_funcall(b, rb_intern("priority"), 0));
else
- rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)", rb_obj_classname(a), rb_path2class("RubyVor::PriorityQueue::QueueItem"));
+ rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)", rb_obj_classname(a), rb_obj_classname(rb_path2class("RubyVor::PriorityQueue::QueueItem")));
return RTEST(aD < bD);
}
@@ -43,7 +42,7 @@ RubyVor_percolate_up(VALUE self, VALUE index)
i = FIX2INT(index) + 1;
if (i < 1 || i > size)
- rb_raise(rb_eIndexError, "index %i out of range", i-1);
+ rb_raise(rb_eIndexError, "index %li out of range", i-1);
j = i / 2;
@@ -79,7 +78,7 @@ RubyVor_percolate_down(VALUE self, VALUE index)
i = FIX2INT(index) + 1;
if (i < 1 || i > size)
- rb_raise(rb_eIndexError, "index %i out of range", i-1);
+ rb_raise(rb_eIndexError, "index %li out of range", i-1);
j = size / 2;

0 comments on commit 80cce5a

Please sign in to comment.
Something went wrong with that request. Please try again.