mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 08:33:38 +03:00
Add casts to CONF_HANDLE_T_U().
This avoids signed/unsigned comparison warnings when specifying integer constants as inputs. Clean up whitespace and add clarifying parentheses for CONF_HANDLE_SIZE_T(opt_lg_chunk, ...).
This commit is contained in:
parent
e723f99dec
commit
2406c22f36
1 changed files with 6 additions and 6 deletions
|
|
@ -1075,18 +1075,18 @@ malloc_conf_init(void)
|
||||||
k, klen, v, vlen); \
|
k, klen, v, vlen); \
|
||||||
} else if (clip) { \
|
} else if (clip) { \
|
||||||
if (CONF_MIN_##check_min(um, \
|
if (CONF_MIN_##check_min(um, \
|
||||||
(min))) \
|
(t)(min))) \
|
||||||
o = (t)(min); \
|
o = (t)(min); \
|
||||||
else if (CONF_MAX_##check_max( \
|
else if (CONF_MAX_##check_max( \
|
||||||
um, (max))) \
|
um, (t)(max))) \
|
||||||
o = (t)(max); \
|
o = (t)(max); \
|
||||||
else \
|
else \
|
||||||
o = (t)um; \
|
o = (t)um; \
|
||||||
} else { \
|
} else { \
|
||||||
if (CONF_MIN_##check_min(um, \
|
if (CONF_MIN_##check_min(um, \
|
||||||
(min)) || \
|
(t)(min)) || \
|
||||||
CONF_MAX_##check_max(um, \
|
CONF_MAX_##check_max(um, \
|
||||||
(max))) { \
|
(t)(max))) { \
|
||||||
malloc_conf_error( \
|
malloc_conf_error( \
|
||||||
"Out-of-range " \
|
"Out-of-range " \
|
||||||
"conf value", \
|
"conf value", \
|
||||||
|
|
@ -1145,8 +1145,8 @@ malloc_conf_init(void)
|
||||||
* accommodates all these constraints.
|
* accommodates all these constraints.
|
||||||
*/
|
*/
|
||||||
CONF_HANDLE_SIZE_T(opt_lg_chunk, "lg_chunk", LG_PAGE +
|
CONF_HANDLE_SIZE_T(opt_lg_chunk, "lg_chunk", LG_PAGE +
|
||||||
LG_SIZE_CLASS_GROUP + 1 + (config_cache_oblivious ||
|
LG_SIZE_CLASS_GROUP + 1 + ((config_cache_oblivious
|
||||||
config_fill ? 1 : 0), (sizeof(size_t) << 3) - 1,
|
|| config_fill) ? 1 : 0), (sizeof(size_t) << 3) - 1,
|
||||||
yes, yes, true)
|
yes, yes, true)
|
||||||
if (strncmp("dss", k, klen) == 0) {
|
if (strncmp("dss", k, klen) == 0) {
|
||||||
int i;
|
int i;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue