mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-03 05:10:16 -05:00
Excludes handling of error condition from the coverage test.
This commit is contained in:
parent
f0cecf55c8
commit
24fd5ab318
17 changed files with 841 additions and 5 deletions
4
elem.h
4
elem.h
|
|
@ -440,8 +440,10 @@ static inline void block_file_set(struct snapraid_block* block, struct snapraid_
|
|||
|
||||
/* ensure that the pointer doesn't use the flag space */
|
||||
if ((ptr & (uintptr_t)BLOCK_STATE_MASK) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Internal error for pointer not aligned\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
block->file_mixed = (block->file_mixed & ~(uintptr_t)BLOCK_STATE_MASK) | ptr;
|
||||
|
|
@ -465,8 +467,10 @@ static inline void block_state_set(struct snapraid_block* block, unsigned state)
|
|||
{
|
||||
/* ensure that the state can be stored inside the file pointer */
|
||||
if ((state & BLOCK_STATE_MASK) != state) {
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Internal error when setting the block state %u\n", state);
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
block->file_mixed &= ~(uintptr_t)BLOCK_STATE_MASK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue