402 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

[OLK-5.10] 3SNIC driver compilation failure using clang

已完成
缺陷 成员
创建于  
2023-06-29 16:33

When using clang to compile OLK-5.10 kernel, 3SNIC driver fails with error messages.

Reproducing Method

cp arch/x86/configs/openeuler_defconfig .config
make CC=clang olddefconfig
make CC=clang

Error Messages

drivers/net/ethernet/3snic/sssnic/hw/sss_adapter_mgmt.c:253:70: error: variable 'i' is uninitialized when used here [-Werror,-Wuninitialized]                                                                 if (snprintf(chip_node->chip_name, IFNAMSIZ, "%s%u", SSS_CHIP_NAME, i) < 0) {
                                                                            ^
drivers/net/ethernet/3snic/sssnic/hw/sss_adapter_mgmt.c:239:17: note: initialize the variable 'i' to silence this warning                                                                                     unsigned char i;
                       ^
                        = '\0'
1 error generated.
drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss_cfg.c:107:38: error: expression does not compute the number of elements in this array; element type is 'u16' (aka 'unsigned short'), not 'u32' (aka 'unsigned int') [-Werror,-Wsizeof-array-div]                                                                                                                                                                  tbl_size = sizeof(indir_tbl->entry) / sizeof(u32);
                          ~~~~~~~~~~~~~~~~  ^
drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss_cfg.c:107:38: note: place parentheses around the 'sizeof(u32)' expression to silence this warning
1 error generated.
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:305:10: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
                return ret;
                       ^~~
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:293:9: note: initialize the variable 'ret' to silence this warning
        int ret;
               ^
                = 0
1 error generated.

评论 (2)

Jason Zeng 创建了缺陷
zhangjialin 任务状态待办的 修改为修复中
zhangjialin 任务状态修复中 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助