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