DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnx2x: fix icc build error
@ 2016-09-30 14:45 Ferruh Yigit
  2016-10-17 12:11 ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2016-09-30 14:45 UTC (permalink / raw)
  To: dev; +Cc: Sony Chacko

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>
---
 drivers/net/bnx2x/elink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c
index 149cc97..d9a72f0 100644
--- a/drivers/net/bnx2x/elink.c
+++ b/drivers/net/bnx2x/elink.c
@@ -6645,7 +6645,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  */
-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-19  9:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30 14:45 [dpdk-dev] [PATCH] net/bnx2x: fix icc build error Ferruh Yigit
2016-10-17 12:11 ` Ferruh Yigit
2016-10-17 18:04   ` Mody, Rasesh
2016-10-19  9:24     ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).