1 Star 0 Fork 19

zhangkea/fcoe-utils

forked from src-openEuler/fcoe-utils 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-Fix-GCC-12-warning.patch 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
From f6401524e1be537a78b24aef686968e2b9af7493 Mon Sep 17 00:00:00 2001
From: Martin Liska <[email protected]>
Date: Thu, 27 Jan 2022 14:36:01 +0100
Subject: [PATCH] Fix GCC 12 warning.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes:
inlined from ‘show_full_lun_info’ at fcoeadm_display.c:310:2:
/usr/include/bits/stdio2.h:112:10: error: ‘osname’ may be used uninitialized [-Werror=maybe-uninitialized]
112 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fcoeadm_display.c: In function ‘show_full_lun_info’:
fcoeadm_display.c:249:15: note: ‘osname’ was declared here
249 | char *osname;
| ^~~~~~
reference: https://github.com/morbidrsa/fcoe-utils/commit/f6401524e1be537a78b24aef686968e2b9af7493
---
fcoeadm_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index c2ef33b82cf..3a18138eefd 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -246,7 +246,7 @@ static void show_full_lun_info(unsigned int hba, unsigned int port,
char vendor[256];
char model[256];
char rev[256];
- char *osname;
+ char *osname = NULL;
char *capstr;
uint64_t lba = 0;
uint32_t blksize = 0;
--
2.39.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangkea/fcoe-utils.git
[email protected]:zhangkea/fcoe-utils.git
zhangkea
fcoe-utils
fcoe-utils
master

搜索帮助