فهرست منبع

Fix more 64 bit conversion warnings.

Mike Pall 15 سال پیش
والد
کامیت
4b0725d5fc
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/lj_alloc.c

+ 2 - 2
src/lj_alloc.c

@@ -203,7 +203,7 @@ struct malloc_chunk {
 typedef struct malloc_chunk  mchunk;
 typedef struct malloc_chunk *mchunkptr;
 typedef struct malloc_chunk *sbinptr;  /* The type of bins of chunks */
-typedef unsigned int bindex_t;         /* Described below */
+typedef size_t bindex_t;               /* Described below */
 typedef unsigned int binmap_t;         /* Described below */
 typedef unsigned int flag_t;           /* The type of various bit flag sets */
 
@@ -416,7 +416,7 @@ static int has_segment_link(mstate m, msegmentptr ss)
 /* assign tree index for size S to variable I */
 #define compute_tree_index(S, I)\
 {\
-  unsigned int X = S >> TREEBIN_SHIFT;\
+  unsigned int X = (unsigned int)(S >> TREEBIN_SHIFT);\
   if (X == 0) {\
     I = 0;\
   } else if (X > 0xFFFF) {\