From ab9035f8dbcf9eff31f72ef61fd82392bf90c1ab Mon Sep 17 00:00:00 2001 From: Pavel Charvat Date: Mon, 17 Jan 2022 00:15:34 +0000 Subject: [PATCH] Build: Silenced some false compilation warnings on debian bullseye. --- ucw/conf-intr.c | 2 +- ucw/sorter/govern.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ucw/conf-intr.c b/ucw/conf-intr.c index 741cd80b..b512b104 100644 --- a/ucw/conf-intr.c +++ b/ucw/conf-intr.c @@ -158,7 +158,7 @@ interpret_section(struct cf_section *sec, int number, char **pars, int *processe *processed = 0; for (struct cf_item *ci=sec->cfg; ci->cls; ci++) { - int taken; + int taken = 0; // assignment only to silence false positive warnings in some compilers about possibly uninitialized variable char *msg = interpret_set_item(ci, number, pars, &taken, ptr + (uintptr_t) ci->ptr, allow_dynamic && !ci[1].cls); if (msg) return cf_printf("Item %s: %s", ci->name, msg); diff --git a/ucw/sorter/govern.c b/ucw/sorter/govern.c index 896548bc..3e7cda78 100644 --- a/ucw/sorter/govern.c +++ b/ucw/sorter/govern.c @@ -64,6 +64,8 @@ sorter_presort(struct sort_context *ctx, struct sort_bucket *in, struct sort_buc static struct sort_bucket * sbuck_join_to(struct sort_bucket *b, ucw_off_t *sizep) { + *sizep = 0; // Not needed, just to silence false warnings in some compilers about uninitialized sizep (it's OK for NULL result) + if (sorter_debug & SORT_DEBUG_NO_JOIN) return NULL; -- 2.39.2