From efa8e6188622a7fe3fcf80efc99bb1b9a4889aa4 Mon Sep 17 00:00:00 2001 From: Michael Adler Date: Sat, 16 Dec 2023 12:27:07 +0100 Subject: [PATCH] Day 14: fix warning about uninitialized values --- src/day14/solve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/day14/solve.c b/src/day14/solve.c index 10a4b29..0f56cd4 100644 --- a/src/day14/solve.c +++ b/src/day14/solve.c @@ -130,7 +130,7 @@ void solve(char *buf, size_t buf_size, Solution *result) { i64 part1, part2 = 0; - XXH128_hash_t hashes[MAX_CYCLE_LEN]; + XXH128_hash_t hashes[MAX_CYCLE_LEN] = {0}; int hashes_count = 0; _cleanup_(ust_XXH128_hash_t_free) ust_XXH128_hash_t seen = ust_XXH128_hash_t_init(hash, equal); ust_XXH128_hash_t_reserve(&seen, MAX_CYCLE_LEN);