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
@@ -2389,7 +2389,6 @@ imalloc_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd,
|
||||
* from the ind_large bucket.
|
||||
*/
|
||||
szind_t ind_large;
|
||||
size_t bumped_usize = usize;
|
||||
|
||||
dopts->alignment = prof_sample_align(dopts->alignment);
|
||||
if (usize <= SC_SMALL_MAXCLASS) {
|
||||
@@ -2398,7 +2397,7 @@ imalloc_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd,
|
||||
sz_sa2u(SC_LARGE_MINCLASS, dopts->alignment))
|
||||
== SC_LARGE_MINCLASS);
|
||||
ind_large = sz_size2index(SC_LARGE_MINCLASS);
|
||||
bumped_usize = sz_s2u(SC_LARGE_MINCLASS);
|
||||
size_t bumped_usize = sz_s2u(SC_LARGE_MINCLASS);
|
||||
ret = imalloc_no_sample(sopts, dopts, tsd, bumped_usize,
|
||||
bumped_usize, ind_large);
|
||||
if (unlikely(ret == NULL)) {
|
||||
|
||||
Reference in New Issue
Block a user