From: Pavel Charvat Date: Mon, 17 Jan 2022 00:15:34 +0000 (+0000) Subject: Build: Silenced some false compilation warnings on debian bullseye. X-Git-Tag: v6.5.14~14 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=ab9035f8dbcf9eff31f72ef61fd82392bf90c1ab;p=libucw.git Build: Silenced some false compilation warnings on debian bullseye. --- 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;