Remove unused ret argument from kh_put.

It doesn't appear to serve any purpose and allows removing warning about various unused variables littered around.

Signed-off-by: Patrick Hogan <pbhogan@gmail.com>
This commit is contained in:
Patrick Hogan
2012-04-25 11:25:09 -05:00
parent a4c9853813
commit a408ba2dd6
5 changed files with 11 additions and 18 deletions
+3 -5
View File
@@ -114,9 +114,8 @@ static void
ivset(mrb_state *mrb, struct kh_iv *h, mrb_sym sym, mrb_value v)
{
khiter_t k;
int r;
k = kh_put(iv, h, sym, &r);
k = kh_put(iv, h, sym);
kh_value(h, k) = v;
}
@@ -179,14 +178,13 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
struct RClass *c = mrb->ci->target_class;
khash_t(iv) *h;
khiter_t k;
int r;
while (c) {
if (c->iv) {
h = c->iv;
k = kh_get(iv, h, sym);
if (k != kh_end(h)) {
k = kh_put(iv, h, sym, &r);
k = kh_put(iv, h, sym);
kh_value(h, k) = v;
}
}
@@ -194,7 +192,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
}
c = mrb->ci->target_class;
h = c->iv = kh_init(iv, mrb);
k = kh_put(iv, h, sym, &r);
k = kh_put(iv, h, sym);
kh_value(h, k) = v;
}