Reduce signed/unsigned comparison warnings; ref #3785

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-08-18 22:54:59 +09:00
parent f1767fd079
commit 8fbc4bef55
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
#define ARY_DEFAULT_LEN 4
#define ARY_SHRINK_RATIO 5 /* must be larger than 2 */
#define ARY_C_MAX_SIZE (SIZE_MAX / sizeof(mrb_value))
#define ARY_MAX_SIZE ((ARY_C_MAX_SIZE < (size_t)MRB_INT_MAX) ? (mrb_int)ARY_C_MAX_SIZE : MRB_INT_MAX-1)
#define ARY_MAX_SIZE ((mrb_int)((ARY_C_MAX_SIZE < (size_t)MRB_INT_MAX) ? ARY_C_MAX_SIZE : MRB_INT_MAX-1))
static struct RArray*
ary_new_capa(mrb_state *mrb, mrb_int capa)