mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 13:13:06 +00:00
Remove dead stores detected by static analysis
None of these are harmful, and they are almost certainly optimized away by the compiler. The motivation for fixing them anyway is that we'd like to enable static analysis as part of CI, and the first step towards that is resolving the warnings it produces at present.
This commit is contained in:
committed by
Qi Wang
parent
0288126d9c
commit
3e2ba7a651
@@ -1803,7 +1803,7 @@ stats_print_helper(emitter_t *emitter, bool merged, bool destroyed,
|
||||
size_t sz;
|
||||
VARIABLE_ARRAY(bool, initialized, narenas);
|
||||
bool destroyed_initialized;
|
||||
unsigned i, j, ninitialized;
|
||||
unsigned i, ninitialized;
|
||||
|
||||
xmallctlnametomib("arena.0.initialized", mib, &miblen);
|
||||
for (i = ninitialized = 0; i < narenas; i++) {
|
||||
@@ -1843,7 +1843,7 @@ stats_print_helper(emitter_t *emitter, bool merged, bool destroyed,
|
||||
|
||||
/* Unmerged stats. */
|
||||
if (unmerged) {
|
||||
for (i = j = 0; i < narenas; i++) {
|
||||
for (i = 0; i < narenas; i++) {
|
||||
if (initialized[i]) {
|
||||
char arena_ind_str[20];
|
||||
malloc_snprintf(arena_ind_str,
|
||||
|
||||
Reference in New Issue
Block a user