TX2踩坑(二):error: ‘msg.msg_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized

修改了makefile中的忽略未初始化告警,还是一样有错误.将源文件修改.

/home/hbg/nvidia/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/pci/endpoint/functions/pci-epf-tegra-vnet.c: In function ‘tvnet_ep_ctrl_irqsp_callback’:
/home/hbg/nvidia/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/pci/endpoint/functions/pci-epf-tegra-vnet.c:670:11: error: ‘msg.msg_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   else if (msg.msg_id == CTRL_MSG_LINK_DOWN_ACK)
           ^
/home/hbg/nvidia/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/pci/endpoint/functions/pci-epf-tegra-vnet.c:662:18: note: ‘msg.msg_id’ was declared here
  struct ctrl_msg msg;
==============================================================

/home/hbg/nvidia/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c: In function ‘tvnet_irq_ctrl’:
/home/hbg/nvidia/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c:610:11: error: ‘msg.msg_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   else if (msg.msg_id == CTRL_MSG_LINK_DOWN_ACK)
           ^
/home/hbg/nvidia/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c:602:18: note: ‘msg.msg_id’ was declared here
  struct ctrl_msg msg;

找到相关的源文件,然后使用memset进行初始化.

上一篇:显卡算力对比,最新显卡算力表,挖矿显卡算力表,显卡算力排行


下一篇:GRU模型结构