Fix dlmalloc warnings due to set_segment_flags, sizeof(size_t)
This commit is contained in:
@@ -1661,7 +1661,7 @@ struct malloc_chunk {
|
|||||||
typedef struct malloc_chunk mchunk;
|
typedef struct malloc_chunk mchunk;
|
||||||
typedef struct malloc_chunk* mchunkptr;
|
typedef struct malloc_chunk* mchunkptr;
|
||||||
typedef struct malloc_chunk* sbinptr; /* The type of bins of chunks */
|
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 binmap_t; /* Described below */
|
||||||
typedef unsigned int flag_t; /* The type of various bit flag sets */
|
typedef unsigned int flag_t; /* The type of various bit flag sets */
|
||||||
|
|
||||||
@@ -3388,7 +3388,7 @@ static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
|
|||||||
*ss = m->seg; /* Push current record */
|
*ss = m->seg; /* Push current record */
|
||||||
m->seg.base = tbase;
|
m->seg.base = tbase;
|
||||||
m->seg.size = tsize;
|
m->seg.size = tsize;
|
||||||
set_segment_flags(&m->seg, mmapped);
|
(void)set_segment_flags(&m->seg, mmapped);
|
||||||
m->seg.next = ss;
|
m->seg.next = ss;
|
||||||
|
|
||||||
/* Insert trailing fenceposts */
|
/* Insert trailing fenceposts */
|
||||||
@@ -3548,7 +3548,7 @@ static void* sys_alloc(mstate m, size_t nb) {
|
|||||||
if (!is_initialized(m)) { /* first-time initialization */
|
if (!is_initialized(m)) { /* first-time initialization */
|
||||||
m->seg.base = m->least_addr = tbase;
|
m->seg.base = m->least_addr = tbase;
|
||||||
m->seg.size = tsize;
|
m->seg.size = tsize;
|
||||||
set_segment_flags(&m->seg, mmap_flag);
|
(void)set_segment_flags(&m->seg, mmap_flag);
|
||||||
m->magic = mparams.magic;
|
m->magic = mparams.magic;
|
||||||
init_bins(m);
|
init_bins(m);
|
||||||
if (is_global(m))
|
if (is_global(m))
|
||||||
|
|||||||
Reference in New Issue
Block a user