Remove unused local variable if MRB_UTF8_STRING is not set.

Ref #4982 #4983
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-04-28 22:31:00 +09:00
committed by Hiroshi Mimaki
parent 9f4b5227fe
commit 1cdcd00cc0
+3 -1
View File
@@ -1446,8 +1446,10 @@ static mrb_value
mrb_io_readchar(mrb_state *mrb, mrb_value self)
{
mrb_value buf;
unsigned char c;
mrb_int len = 1;
#ifdef MRB_UTF8_STRING
unsigned char c;
#endif
mrb_get_args(mrb, "S", &buf);
mrb_assert(RSTRING_PTR(buf) > 0);