From: Ferruh Yigit Date: Fri, 30 Sep 2016 14:14:13 +0000 (+0100) Subject: net/bnx2x: fix build with icc X-Git-Tag: spdx-start~5482 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=35050da740f0a031fb2c550f367d14db30ca8b9a;hp=5b463eda8d26ded69700bc76c0e465e0a5a3f6fb;p=dpdk.git net/bnx2x: fix build with icc 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 Acked-by: Rasesh Mody --- diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index f27c0a61a5..532939620a 100644 --- a/drivers/net/bnx2x/elink.c +++ b/drivers/net/bnx2x/elink.c @@ -6590,7 +6590,7 @@ static elink_status_t elink_8073_8727_external_rom_boot(struct bnx2x_softc *sc, 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 */