dcavalca / rpms / util-linux

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