Silence clang static analyzer warnings

This commit is contained in:
Andrea Mazzoleni 2026-07-30 12:40:08 +02:00
parent 52c00ea982
commit cd39ccf752
10 changed files with 35 additions and 19 deletions

View file

@ -329,7 +329,9 @@ static int repair(struct snapraid_state* state, int rehash, block_off_t pos, uns
/* LCOV_EXCL_STOP */
}
if (hash_is_invalid(block->hash)) {
if (block == BLOCK_NULL) {
hash = "none";
} else if (hash_is_invalid(block->hash)) {
hash = "lost";
} else if (hash_is_zero(block->hash)) {
hash = "zero";