From 2406c22f366e8d2c37f4d38b2cd857a2a8bf1aa7 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Tue, 28 Feb 2017 14:57:10 -0800 Subject: [PATCH] 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, ...). --- src/jemalloc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jemalloc.c b/src/jemalloc.c index 1cefd4ce..f73a26cd 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -1075,18 +1075,18 @@ malloc_conf_init(void) k, klen, v, vlen); \ } else if (clip) { \ if (CONF_MIN_##check_min(um, \ - (min))) \ + (t)(min))) \ o = (t)(min); \ else if (CONF_MAX_##check_max( \ - um, (max))) \ + um, (t)(max))) \ o = (t)(max); \ else \ o = (t)um; \ } else { \ if (CONF_MIN_##check_min(um, \ - (min)) || \ + (t)(min)) || \ CONF_MAX_##check_max(um, \ - (max))) { \ + (t)(max))) { \ malloc_conf_error( \ "Out-of-range " \ "conf value", \ @@ -1145,8 +1145,8 @@ malloc_conf_init(void) * accommodates all these constraints. */ CONF_HANDLE_SIZE_T(opt_lg_chunk, "lg_chunk", LG_PAGE + - LG_SIZE_CLASS_GROUP + 1 + (config_cache_oblivious || - config_fill ? 1 : 0), (sizeof(size_t) << 3) - 1, + LG_SIZE_CLASS_GROUP + 1 + ((config_cache_oblivious + || config_fill) ? 1 : 0), (sizeof(size_t) << 3) - 1, yes, yes, true) if (strncmp("dss", k, klen) == 0) { int i;