]> mj.ucw.cz Git - libucw.git/commitdiff
Build: Silenced some false compilation warnings on debian bullseye.
authorPavel Charvat <pchar@ucw.cz>
Mon, 17 Jan 2022 00:15:34 +0000 (00:15 +0000)
committerPavel Charvat <pchar@ucw.cz>
Mon, 17 Jan 2022 00:36:14 +0000 (00:36 +0000)
ucw/conf-intr.c
ucw/sorter/govern.c

index 741cd80b44abc626139b94fba80bf01a3337577d..b512b1041ef88c106dd4a307461a140faefb122f 100644 (file)
@@ -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);
index 896548bc9295b4e3513e3102f2ce9a53313abb89..3e7cda7814026126672972b4c85436ee147847dd 100644 (file)
@@ -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;