mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Prevent 'mixed declarations and code' C90 warning
This commit is contained in:
+2
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user