From a64d79ca4c5699be161a54d94e0e6c0f7d06db7c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 28 Sep 2017 09:25:17 -0400 Subject: Move around some LCOV_EXCLs in src/common Apparently, my compiler now generates coverage markers for label-only lines, so we need to exclude those too if they are meant to be unreachable. --- src/common/compress_lzma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/common/compress_lzma.c') diff --git a/src/common/compress_lzma.c b/src/common/compress_lzma.c index 2bdbbe1d45..6426ede4fd 100644 --- a/src/common/compress_lzma.c +++ b/src/common/compress_lzma.c @@ -158,8 +158,10 @@ tor_lzma_state_size_precalc(int compress, compression_level_t level) return (size_t)memory_usage; + // LCOV_EXCL_START err: - return 0; // LCOV_EXCL_LINE + return 0; + // LCOV_EXCL_STOP } #endif /* defined(HAVE_LZMA) */ @@ -212,9 +214,11 @@ tor_lzma_compress_new(int compress, atomic_counter_add(&total_lzma_allocation, result->allocation); return result; + /* LCOV_EXCL_START */ err: - tor_free(result); // LCOV_EXCL_LINE + tor_free(result); return NULL; + /* LCOV_EXCL_STOP */ #else /* !(defined(HAVE_LZMA)) */ (void)compress; (void)method; -- cgit v1.2.3-54-g00ecf