summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2014-01-21 22:59:13 (GMT)
committerJason Evans <jasone@canonware.com>2014-01-21 22:59:13 (GMT)
commite2206edebcce662e3979c68ba182d0bcf38141ba (patch)
treebb3ac90e543c1f7e46f1cbad25765eeb0c336c40
parent7d8fea987182fe2ee17eb5c1c6f3ae620f82beb0 (diff)
downloadjemalloc-e2206edebcce662e3979c68ba182d0bcf38141ba.zip
jemalloc-e2206edebcce662e3979c68ba182d0bcf38141ba.tar.gz
jemalloc-e2206edebcce662e3979c68ba182d0bcf38141ba.tar.bz2
Fix unused variable warnings.
-rw-r--r--src/jemalloc.c6
-rw-r--r--test/unit/rb.c4
2 files changed, 3 insertions, 7 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c
index 9fc9b8d..563d99f 100644
--- a/src/jemalloc.c
+++ b/src/jemalloc.c
@@ -1696,11 +1696,9 @@ je_xallocx(void *ptr, size_t size, size_t extra, int flags)
assert(malloc_initialized || IS_INITIALIZER);
malloc_thread_init();
- if (arena_ind != UINT_MAX) {
- arena_chunk_t *chunk;
- chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
+ if (arena_ind != UINT_MAX)
arena = arenas[arena_ind];
- } else
+ else
arena = NULL;
old_usize = isalloc(ptr, config_prof);
diff --git a/test/unit/rb.c b/test/unit/rb.c
index d79ec52..b737485 100644
--- a/test/unit/rb.c
+++ b/test/unit/rb.c
@@ -79,11 +79,9 @@ tree_recurse(node_t *node, unsigned black_height, unsigned black_depth,
/* Red nodes must be interleaved with black nodes. */
if (rbtn_red_get(node_t, link, node)) {
- node_t *t_node = rbtn_left_get(node_t, link, left_node);
assert_false(rbtn_red_get(node_t, link, left_node),
"Node should be black");
- t_node = rbtn_right_get(node_t, link, left_node);
- assert_false(rbtn_red_get(node_t, link, left_node),
+ assert_false(rbtn_red_get(node_t, link, right_node),
"Node should be black");
}