]> git.droids-corp.org - dpdk.git/commit
raw/ifpga: fix build with optimization
authorWei Huang <wei.huang@intel.com>
Wed, 16 Mar 2022 07:26:30 +0000 (03:26 -0400)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 16 Mar 2022 19:35:04 +0000 (20:35 +0100)
commit047c25401d2b4001e7e20200a5ec05868a113290
tree9626f0a53269151ff90cb0a99b6f3b113c87e6dc
parent4ac7359b5c05f7712f8f85c2633e11388e68edd8
raw/ifpga: fix build with optimization

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.

Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
drivers/raw/ifpga/ifpga_rawdev.c