Navigation Menu

Skip to content

Commit

Permalink
Fewer compilation warnings for 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
abscondment committed Jan 27, 2010
1 parent e34a922 commit 80cce5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ext/rb_cComputation.c
Expand Up @@ -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
*
Expand Down
9 changes: 4 additions & 5 deletions ext/rb_cPriorityQueue.c
Expand Up @@ -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);
}
Expand All @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 80cce5a

Please sign in to comment.