Don't compare `int' with `size_t` (from `sizeof()`).

parent d0b5d720
...@@ -103,7 +103,7 @@ dump_float(mrb_state *mrb, uint8_t *buf, mrb_float f) ...@@ -103,7 +103,7 @@ dump_float(mrb_state *mrb, uint8_t *buf, mrb_float f)
memcpy(buf, u.s, sizeof(double)); memcpy(buf, u.s, sizeof(double));
} }
else { else {
int i; size_t i;
for (i=0; i<sizeof(double); i++) { for (i=0; i<sizeof(double); i++) {
buf[i] = u.s[sizeof(double)-i-1]; buf[i] = u.s[sizeof(double)-i-1];
......
...@@ -55,7 +55,7 @@ str_to_double(mrb_state *mrb, const char *p, size_t len) ...@@ -55,7 +55,7 @@ str_to_double(mrb_state *mrb, const char *p, size_t len)
memcpy(u.s, p, sizeof(double)); memcpy(u.s, p, sizeof(double));
} }
else { else {
int i; size_t i;
for (i=0; i<sizeof(double); i++) { for (i=0; i<sizeof(double); i++) {
u.s[i] = p[sizeof(double)-i-1]; u.s[i] = p[sizeof(double)-i-1];
} }
......
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