Exclude a few lines from lcov coverage stats:
- "fail" branches in selftests
- "should never happen" errors in SSL
- cipher_xxx() failures in SSL
- some things that fail only if malloc() fails
- some things that fail only if fread/fwrite()/ftell() fails
(after fopen() succeeded)
- some things that fail only if a parameter is invalid, but the parameter was
actually validated earlier
- generated code in library/error.c
diff --git a/library/entropy_poll.c b/library/entropy_poll.c
index 25a27be..6aa0a01 100644
--- a/library/entropy_poll.c
+++ b/library/entropy_poll.c
@@ -166,10 +166,10 @@
read_len = fread( output, 1, len, file );
if( read_len != len )
- {
+ { // LCOV_EXCL_START
fclose( file );
return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );
- }
+ } // LCOV_EXCL_STOP
fclose( file );
*olen = len;