20 Star 0 Fork 19

openEuler-RISC-V/fcoe-utils

forked from src-openEuler/fcoe-utils 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-03-use-of-uninitialized-values-detected-during-LTO.patch 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
From 64254aee4509192831b9f9cf695abd81a9656f00 Mon Sep 17 00:00:00 2001
From: Chris Leech <[email protected]>
Date: Mon, 21 Sep 2020 09:33:23 -0700
Subject: [PATCH 2/2] use of uninitialized values detected during LTO
lto-wrapper build errors
Signed-off-by: Chris Leech <[email protected]>
---
fcoeadm_display.c | 2 +-
lib/sysfs_hba.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index 4b1d358d1c8..585ecfae54e 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -348,7 +348,7 @@ static void show_short_lun_info(unsigned int hba, unsigned int port,
uint32_t blksize = 0;
char *capstr = "Unknown";
char *osname = "Unknown";
- uint64_t size;
+ uint64_t size = 0;
int rc;
rc = snprintf(path, sizeof(path),
diff --git a/lib/sysfs_hba.c b/lib/sysfs_hba.c
index a8d557e92b5..381f335d7ea 100644
--- a/lib/sysfs_hba.c
+++ b/lib/sysfs_hba.c
@@ -528,7 +528,7 @@ char *get_host_by_fcid(uint32_t fcid)
DIR *dir;
char *host = NULL;
char path[1024];
- uint32_t port_id;
+ uint32_t port_id = 0;
dir = opendir(SYSFS_HOST_DIR);
if (!dir)
@@ -562,7 +562,7 @@ char *get_rport_by_fcid(uint32_t fcid)
DIR *dir;
char *rport = NULL;
char path[1024];
- uint32_t port_id;
+ uint32_t port_id = 0;
dir = opendir(SYSFS_RPORT_DIR);
if (!dir)
--
2.18.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/fcoe-utils.git
[email protected]:openeuler-risc-v/fcoe-utils.git
openeuler-risc-v
fcoe-utils
fcoe-utils
master

搜索帮助