Silence clang static analyzer warnings

This commit is contained in:
Andrea Mazzoleni 2026-07-30 12:40:08 +02:00
parent 0f0873cf2b
commit 31011d34c3
10 changed files with 29 additions and 21 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";