[PATCH v1] raw/ifpga: initialize variable to avoid compile error

Gao, DaxueX daxuex.gao at intel.com
Wed Mar 16 10:27:56 CET 2022


> -----Original Message-----
> From: Wei Huang <wei.huang at intel.com>
> Sent: 2022年3月16日 15:27
> To: dev at dpdk.org; thomas at monjalon.net; Xu, Rosen <rosen.xu at intel.com>;
> nipun.gupta at nxp.com; hemant.agrawal at nxp.com
> Cc: stable at dpdk.org; Zhang, Tianfei <tianfei.zhang at intel.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>; Yigit, Ferruh <ferruh.yigit at intel.com>; Huang, Wei
> <wei.huang at intel.com>
> Subject: [PATCH v1] raw/ifpga: initialize variable to avoid compile error
> 
> Compile failed with cflag optimization=1 on Ubuntu20.04 with GCC10.3, it
> reported vendor_id and dev_id may be used uninitialized in function
> ifpga_rawdev_fill_info().
> Actually it's not the truth, the variables are initialized in function
> ifpga_get_dev_vendor_id(). To avoid such compile error, the variables are
> initialized when they are defined.
> 
> Signed-off-by: Wei Huang <wei.huang at intel.com>
> Acked-by: Tianfei Zhang <tianfei.zhang at intel.com>
> Acked-by: Rosen Xu <rosen.xu at intel.com>
> ---

Tested-by: Daxue Gao <daxuex.gao at intel.com>


More information about the dev mailing list