aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_alloc.c b/src/lj_alloc.c
index c8e4910d..9aa6440d 100644
--- a/src/lj_alloc.c
+++ b/src/lj_alloc.c
@@ -203,7 +203,7 @@ struct malloc_chunk {
203typedef struct malloc_chunk mchunk; 203typedef struct malloc_chunk mchunk;
204typedef struct malloc_chunk *mchunkptr; 204typedef struct malloc_chunk *mchunkptr;
205typedef struct malloc_chunk *sbinptr; /* The type of bins of chunks */ 205typedef struct malloc_chunk *sbinptr; /* The type of bins of chunks */
206typedef unsigned int bindex_t; /* Described below */ 206typedef size_t bindex_t; /* Described below */
207typedef unsigned int binmap_t; /* Described below */ 207typedef unsigned int binmap_t; /* Described below */
208typedef unsigned int flag_t; /* The type of various bit flag sets */ 208typedef unsigned int flag_t; /* The type of various bit flag sets */
209 209
@@ -416,7 +416,7 @@ static int has_segment_link(mstate m, msegmentptr ss)
416/* assign tree index for size S to variable I */ 416/* assign tree index for size S to variable I */
417#define compute_tree_index(S, I)\ 417#define compute_tree_index(S, I)\
418{\ 418{\
419 unsigned int X = S >> TREEBIN_SHIFT;\ 419 unsigned int X = (unsigned int)(S >> TREEBIN_SHIFT);\
420 if (X == 0) {\ 420 if (X == 0) {\
421 I = 0;\ 421 I = 0;\
422 } else if (X > 0xFFFF) {\ 422 } else if (X > 0xFFFF) {\