File bug-1164718_21-gcc-clean-uninitialized-var-warning.patch of Package lvm2.18094
From b0e1019add988b91fb41355566a34a3b2e182569 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Tue, 25 Jun 2019 22:49:24 +0200 Subject: [PATCH] gcc: clean uninitialized var warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some older gcc versions shows this (FP) warning: label/label.c:360: warning: â€sector’ may be used uninitialized in this function --- lib/label/label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/label/label.c b/lib/label/label.c index d6212b15b..a535bd4d3 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -357,7 +357,7 @@ static int _process_block(struct cmd_context *cmd, struct dev_filter *f, char label_buf[LABEL_SIZE] __attribute__((aligned(8))); struct label *label = NULL; struct labeller *labeller; - uint64_t sector; + uint64_t sector = 0; int ret = 0; int pass; -- 2.24.0