Blame SOURCES/0067-Fix-variable-sz-uninitialized-error.patch

b15ea1
From 9dc04c2fd88b6e0e0fe411885041925d52f71af3 Mon Sep 17 00:00:00 2001
b15ea1
From: Chih-Wei Huang <cwhuang@linux.org.tw>
b15ea1
Date: Wed, 22 Jan 2020 12:16:12 +0800
b15ea1
Subject: [PATCH 67/86] Fix variable 'sz' uninitialized error
b15ea1
b15ea1
To fix the error:
b15ea1
b15ea1
external/efivar/src/linux-virtual-root.c:66:4: error: variable 'sz' is uninitialized when used here [-Werror,-Wuninitialized]
b15ea1
                        sz += pos1;
b15ea1
                        ^~
b15ea1
external/efivar/src/linux-virtual-root.c:45:12: note: initialize the variable 'sz' to silence this warning
b15ea1
        ssize_t sz;
b15ea1
                  ^
b15ea1
                   = 0
b15ea1
1 error generated.
b15ea1
b15ea1
Fixes: c41da0bd ("Handle /sys/devices/virtual/{nvme-fabrics,nvme-subsystem} devices")
b15ea1
b15ea1
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
b15ea1
---
b15ea1
 src/linux-virtual-root.c | 2 +-
b15ea1
 1 file changed, 1 insertion(+), 1 deletion(-)
b15ea1
b15ea1
diff --git a/src/linux-virtual-root.c b/src/linux-virtual-root.c
b15ea1
index 75fbbfc1de6..2d39c28ebb6 100644
b15ea1
--- a/src/linux-virtual-root.c
b15ea1
+++ b/src/linux-virtual-root.c
b15ea1
@@ -42,7 +42,7 @@ static ssize_t
b15ea1
 parse_virtual_root(struct device *dev UNUSED, const char *current, const char *root UNUSED)
b15ea1
 {
b15ea1
 	int rc;
b15ea1
-	ssize_t sz;
b15ea1
+	ssize_t sz = 0;
b15ea1
 	int pos0 = 0, pos1 = 0;
b15ea1
 	struct subdir {
b15ea1
 		const char * const name;
b15ea1
-- 
b15ea1
2.24.1
b15ea1