diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_alloc.c | 4 |
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 { | |||
| 203 | typedef struct malloc_chunk mchunk; | 203 | typedef struct malloc_chunk mchunk; |
| 204 | typedef struct malloc_chunk *mchunkptr; | 204 | typedef struct malloc_chunk *mchunkptr; |
| 205 | typedef struct malloc_chunk *sbinptr; /* The type of bins of chunks */ | 205 | typedef struct malloc_chunk *sbinptr; /* The type of bins of chunks */ |
| 206 | typedef unsigned int bindex_t; /* Described below */ | 206 | typedef size_t bindex_t; /* Described below */ |
| 207 | typedef unsigned int binmap_t; /* Described below */ | 207 | typedef unsigned int binmap_t; /* Described below */ |
| 208 | typedef unsigned int flag_t; /* The type of various bit flag sets */ | 208 | typedef 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) {\ |
