explicit int to size_t cast

This commit is contained in:
Yuichi Nishiwaki 2014-09-26 23:24:17 +09:00
parent 36328c154b
commit 9906865932
2 changed files with 4 additions and 4 deletions

View File

@ -1075,17 +1075,17 @@ static int
index_local(codegen_state *state, pic_sym sym) index_local(codegen_state *state, pic_sym sym)
{ {
codegen_context *cxt = state->cxt; codegen_context *cxt = state->cxt;
size_t i, offset; int i, offset;
pic_sym *var; pic_sym *var;
offset = 1; offset = 1;
for (i = 0; i < xv_size(&cxt->args); ++i) { for (i = 0; i < (int)xv_size(&cxt->args); ++i) {
var = xv_get(&cxt->args, i); var = xv_get(&cxt->args, i);
if (*var == sym) if (*var == sym)
return i + offset; return i + offset;
} }
offset += i; offset += i;
for (i = 0; i < xv_size(&cxt->locals); ++i) { for (i = 0; i < (int)xv_size(&cxt->locals); ++i) {
var = xv_get(&cxt->locals, i); var = xv_get(&cxt->locals, i);
if (*var == sym) if (*var == sym)
return i + offset; return i + offset;

View File

@ -463,7 +463,7 @@ pic_str_string_to_list(pic_state *pic)
case 1: case 1:
start = 0; start = 0;
case 2: case 2:
end = pic_strlen(str); end = (int)pic_strlen(str);
} }
list = pic_nil_value(); list = pic_nil_value();