When bnx2x debug config enabled, icc (ICC) 17.0.0
20160721
gives the following compilation error:
.../drivers/net/bnx2x/elink.c(6682):
error #3656: variable "fw_ver1" may be used before its value is set
PMD_DRV_LOG(DEBUG,
^
According logic in the code, this error is a false positive,
but since this is not in the fast path, fixing compiler error by
assigning initial value to variable.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rasesh Mody <rasesh.mody@qlogic.com>
uint8_t port)
{
uint32_t count = 0;
- uint16_t fw_ver1, fw_msgout;
+ uint16_t fw_ver1 = 0, fw_msgout;
elink_status_t rc = ELINK_STATUS_OK;
/* Boot port from external ROM */