From 17fd45928c47104e3160714e7c8169e1634ad204 Mon Sep 17 00:00:00 2001 From: Dominik Loidolt <dominik.loidolt@univie.ac.at> Date: Thu, 2 May 2024 14:47:30 +0200 Subject: [PATCH] Fix may be used uninitialized warning --- programs/cmp_tool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cmp_tool.c b/programs/cmp_tool.c index fc608b2..b7512eb 100644 --- a/programs/cmp_tool.c +++ b/programs/cmp_tool.c @@ -156,7 +156,7 @@ int main(int argc, char **argv) /* buffer containing the read in model */ uint16_t *input_model_buf = NULL; /* size of the data to be compressed and the model of it */ - uint32_t input_size; + uint32_t input_size = 0; struct cmp_info info = {0}; /* decompression information struct */ struct cmp_cfg cfg = {0}; /* compressor configuration struct */ @@ -750,7 +750,7 @@ static int compression_of_chunk(void *chunk, uint32_t size, void *model, struct uint32_t bound = compress_chunk_cmp_size_bound(chunk, size); uint32_t *cmp_data; uint32_t cmp_size; - int error; + int error = 0; compress_chunk_init(&return_timestamp, cmp_tool_gen_version_id(CMP_TOOL_VERSION)); -- GitLab