Prevent 'mixed declarations and code' C90 warning

This commit is contained in:
Tomás Pollak
2019-04-16 18:02:30 -04:00
committed by GitHub
parent bcb8e297fc
commit ef3b539125
+2 -1
View File
@@ -207,12 +207,13 @@ flo_to_s(mrb_state *mrb, mrb_value flt)
char fmt[] = "%." MRB_STRINGIZE(FLO_TO_STR_PREC) "g";
mrb_value str = mrb_float_to_str(mrb, flt, fmt);
mrb_int len;
char *p;
char *begp;
char *endp;
insert_dot_zero:
begp = RSTRING_PTR(str);
len = RSTRING_LEN(str);
char *p, *endp;
for (p = begp, endp = p + len; p < endp; ++p) {
if (*p == '.') {
return str;