cdown / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/0032-zramctl-fix-compiler-warning-Werror-maybe-uninitiali.patch

d8d8bc
From cee4a7f69d853fcc574241d394edc5bcb91469a5 Mon Sep 17 00:00:00 2001
d8d8bc
From: Karel Zak <kzak@redhat.com>
d8d8bc
Date: Mon, 6 Jun 2022 16:19:16 +0200
d8d8bc
Subject: zramctl: fix compiler warning [-Werror=maybe-uninitialized]
d8d8bc
d8d8bc
Upstream: http://github.com/util-linux/util-linux/commit/8883f037466a5534554d7d9114aceb740295ef20
d8d8bc
Addresses: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2109459
d8d8bc
Signed-off-by: Karel Zak <kzak@redhat.com>
d8d8bc
---
d8d8bc
 sys-utils/zramctl.c | 2 +-
d8d8bc
 1 file changed, 1 insertion(+), 1 deletion(-)
d8d8bc
d8d8bc
diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c
d8d8bc
index 003349fad..64d5fcd81 100644
d8d8bc
--- a/sys-utils/zramctl.c
d8d8bc
+++ b/sys-utils/zramctl.c
d8d8bc
@@ -291,7 +291,7 @@ static struct path_cxt *zram_get_control(void)
d8d8bc
 
d8d8bc
 static int zram_control_add(struct zram *z)
d8d8bc
 {
d8d8bc
-	int n;
d8d8bc
+	int n = 0;
d8d8bc
 	struct path_cxt *ctl;
d8d8bc
 
d8d8bc
 	if (!zram_has_control(z) || !(ctl = zram_get_control()))
d8d8bc
-- 
d8d8bc
2.36.1
d8d8bc