Excludes handling of error condition from the coverage test.

This commit is contained in:
Andrea Mazzoleni 2014-02-03 22:40:51 +01:00
parent f0cecf55c8
commit 24fd5ab318
17 changed files with 841 additions and 5 deletions

4
elem.h
View file

@ -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;