mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 13:13:06 +00:00
Fix static analysis warnings.
This commit is contained in:
@@ -460,8 +460,12 @@ arena_bind(tsd_t *tsd, unsigned ind, bool internal) {
|
||||
tsd_iarena_set(tsd, arena);
|
||||
} else {
|
||||
tsd_arena_set(tsd, arena);
|
||||
unsigned shard = atomic_fetch_add_u(&arena->binshard_next, 1,
|
||||
ATOMIC_RELAXED);
|
||||
/*
|
||||
* While shard acts as a random seed, the cast below should
|
||||
* not make much difference.
|
||||
*/
|
||||
uint8_t shard = (uint8_t)atomic_fetch_add_u(
|
||||
&arena->binshard_next, 1, ATOMIC_RELAXED);
|
||||
tsd_binshards_t *bins = tsd_binshardsp_get(tsd);
|
||||
for (unsigned i = 0; i < SC_NBINS; i++) {
|
||||
assert(bin_infos[i].n_shards > 0 &&
|
||||
|
||||
Reference in New Issue
Block a user