diff --git a/src/common/compress_lzma.c b/src/common/compress_lzma.c index 30d5920ca8..d453d9f718 100644 --- a/src/common/compress_lzma.c +++ b/src/common/compress_lzma.c @@ -46,7 +46,6 @@ memory_level(compression_level_t level) static const char * lzma_error_str(lzma_ret error) { - // LCOV_EXCL_START switch (error) { case LZMA_OK: return "Operation completed successfully"; @@ -75,7 +74,6 @@ lzma_error_str(lzma_ret error) default: return "Unknown LZMA error"; } - // LCOV_EXCL_STOP } #endif // HAVE_LZMA. @@ -303,12 +301,10 @@ tor_lzma_compress_process(tor_lzma_compress_state_t *state, case LZMA_DATA_ERROR: case LZMA_PROG_ERROR: default: - // LCOV_EXCL_START log_warn(LD_GENERAL, "LZMA %s didn't finish: %s.", state->compress ? "compression" : "decompression", lzma_error_str(retval)); return TOR_COMPRESS_ERROR; - // LCOV_EXCL_STOP } #else // HAVE_LZMA. (void)state; diff --git a/src/common/compress_zstd.c b/src/common/compress_zstd.c index 5c5026c37d..0808bcd9ab 100644 --- a/src/common/compress_zstd.c +++ b/src/common/compress_zstd.c @@ -197,7 +197,8 @@ tor_zstd_compress_new(int compress, if (result->u.compress_stream == NULL) { // LCOV_EXCL_START - log_warn(LD_GENERAL, "Error while creating Zstandard stream"); + log_warn(LD_GENERAL, "Error while creating Zstandard compression " + "stream"); goto err; // LCOV_EXCL_STOP } @@ -216,7 +217,8 @@ tor_zstd_compress_new(int compress, if (result->u.decompress_stream == NULL) { // LCOV_EXCL_START - log_warn(LD_GENERAL, "Error while creating Zstandard stream"); + log_warn(LD_GENERAL, "Error while creating Zstandard decompression " + "stream"); goto err; // LCOV_EXCL_STOP } @@ -313,12 +315,10 @@ tor_zstd_compress_process(tor_zstd_compress_state_t *state, } if (ZSTD_isError(retval)) { - // LCOV_EXCL_START log_warn(LD_GENERAL, "Zstandard %s didn't finish: %s.", state->compress ? "compression" : "decompression", ZSTD_getErrorName(retval)); return TOR_COMPRESS_ERROR; - // LCOV_EXCL_STOP } if (state->compress && !state->have_called_end) { @@ -328,11 +328,9 @@ tor_zstd_compress_process(tor_zstd_compress_state_t *state, *out_len = output.size - output.pos; if (ZSTD_isError(retval)) { - // LCOV_EXCL_START log_warn(LD_GENERAL, "Zstandard compression unable to flush: %s.", ZSTD_getErrorName(retval)); return TOR_COMPRESS_ERROR; - // LCOV_EXCL_STOP } // ZSTD_flushStream returns 0 if the frame is done, or >0 if it @@ -359,12 +357,10 @@ tor_zstd_compress_process(tor_zstd_compress_state_t *state, *out_len = output.size - output.pos; if (ZSTD_isError(retval)) { - // LCOV_EXCL_START log_warn(LD_GENERAL, "Zstandard compression unable to write " "epilogue: %s.", ZSTD_getErrorName(retval)); return TOR_COMPRESS_ERROR; - // LCOV_EXCL_STOP } // endStream returns the number of bytes that is needed to write the