Commit 2134d6b4 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #992 from kano4/unused

Remove unused return value in mruby.c
parents 67f7c0c5 f05c3bce
...@@ -52,7 +52,7 @@ usage(const char *name) ...@@ -52,7 +52,7 @@ usage(const char *name)
printf("Usage: %s [switches] programfile\n", name); printf("Usage: %s [switches] programfile\n", name);
while(*p) while(*p)
printf(" %s\n", *p++); printf(" %s\n", *p++);
} }
static int static int
...@@ -125,7 +125,6 @@ append_cmdline: ...@@ -125,7 +125,6 @@ append_cmdline:
exit(0); exit(0);
} }
else return -3; else return -3;
return 0;
default: default:
return -4; return -4;
} }
...@@ -189,14 +188,14 @@ showcallinfo(mrb_state *mrb) ...@@ -189,14 +188,14 @@ showcallinfo(mrb_state *mrb)
if (irep->filename != NULL) if (irep->filename != NULL)
filename = irep->filename; filename = irep->filename;
if (irep->lines != NULL) { if (irep->lines != NULL) {
mrb_code *pc; mrb_code *pc;
if (i+1 <= ciidx) { if (i+1 <= ciidx) {
pc = mrb->cibase[i+1].pc; pc = mrb->cibase[i+1].pc;
} }
else { else {
pc = (mrb_code*)mrb_voidp(mrb_obj_iv_get(mrb, mrb->exc, mrb_intern(mrb, "lastpc"))); pc = (mrb_code*)mrb_voidp(mrb_obj_iv_get(mrb, mrb->exc, mrb_intern(mrb, "lastpc")));
} }
if (irep->iseq <= pc && pc < irep->iseq + irep->ilen) { if (irep->iseq <= pc && pc < irep->iseq + irep->ilen) {
line = irep->lines[pc - irep->iseq - 1]; line = irep->lines[pc - irep->iseq - 1];
} }
...@@ -211,19 +210,16 @@ showcallinfo(mrb_state *mrb) ...@@ -211,19 +210,16 @@ showcallinfo(mrb_state *mrb)
method = mrb_sym2name(mrb, ci->mid); method = mrb_sym2name(mrb, ci->mid);
if (method) { if (method) {
const char *cn = mrb_class_name(mrb, ci->proc->target_class); const char *cn = mrb_class_name(mrb, ci->proc->target_class);
if (cn) { if (cn) {
printf("\t[%d] %s:%d:in %s%s%s\n", printf("\t[%d] %s:%d:in %s%s%s\n", i, filename, line, cn, sep, method);
i, filename, line, cn, sep, method);
} }
else { else {
printf("\t[%d] %s:%d:in %s\n", printf("\t[%d] %s:%d:in %s\n", i, filename, line, method);
i, filename, line, method);
} }
} }
else { else {
printf("\t[%d] %s:%d\n", printf("\t[%d] %s:%d\n", i, filename, line);
i, filename, line);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment