1 Star 0 Fork 68

李辉松 / dpdk

forked from src-openEuler / dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0150-net-hns3-fix-build-with-gcov.patch 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
From 0acb77e818a7a0e71126667f0624c19c2706f59c Mon Sep 17 00:00:00 2001
From: Dongdong Liu <liudongdong3@huawei.com>
Date: Fri, 21 Oct 2022 15:36:26 +0800
Subject: [PATCH 150/189] net/hns3: fix build with gcov
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
meson build -Db_coverage=true
ninja -C build
../drivers/net/hns3/hns3_ethdev.c:2856:22: warning: ‘cfg.umv_space’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
2856 | pf->wanted_umv_size = cfg.umv_space;
Fix compiling warnings using gcc 10.3.1.
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index c59543ef5b..45b5d699b4 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2808,6 +2808,7 @@ hns3_get_board_configuration(struct hns3_hw *hw)
struct hns3_cfg cfg;
int ret;
+ memset(&cfg, 0, sizeof(cfg));
ret = hns3_get_board_cfg(hw, &cfg);
if (ret) {
PMD_INIT_LOG(ERR, "get board config failed %d", ret);
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li-huisong/dpdk.git
git@gitee.com:li-huisong/dpdk.git
li-huisong
dpdk
dpdk
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891