From 9906865932edbaf4cddac6127bb83070bce9aef9 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Fri, 26 Sep 2014 23:24:17 +0900 Subject: [PATCH] explicit int to size_t cast --- codegen.c | 6 +++--- string.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codegen.c b/codegen.c index 050f18c2..fec7ad43 100644 --- a/codegen.c +++ b/codegen.c @@ -1075,17 +1075,17 @@ static int index_local(codegen_state *state, pic_sym sym) { codegen_context *cxt = state->cxt; - size_t i, offset; + int i, offset; pic_sym *var; 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); if (*var == sym) return i + offset; } 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); if (*var == sym) return i + offset; diff --git a/string.c b/string.c index 2372ea31..3bad3daf 100644 --- a/string.c +++ b/string.c @@ -463,7 +463,7 @@ pic_str_string_to_list(pic_state *pic) case 1: start = 0; case 2: - end = pic_strlen(str); + end = (int)pic_strlen(str); } list = pic_nil_value();