From a635f49a5873a104c8867bd1f6375d7a5064be5e Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Thu, 8 Oct 2015 22:46:13 +0800 Subject: [PATCH] ixgbe: fix a build warning being treated as error Upstream-Status: Inappropriate [other] The change is part of a feature commit upstream (e0ba4e77605ab500518247cb6fab98dd3d87ba97) that we don't want to backport. Initialize the data byte to avoid warnings like: lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c: In function 'ixgbe_read_i2c_combined_generic': lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c:2101:9: error: 'low_bits' may be used uninitialized in this function [-Werror=maybe-uninitialized] *data |= bit << i; ^ dpdk/2.0.0-r0/dpdk-2.0.0/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c:120:5: note: 'low_bits' was declared here u8 low_bits; ^ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c:2101:9: error: 'high_bits' may be used uninitialized in this function [-Werror=maybe-uninitialized] *data |= bit << i; ^ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c:119:5: note: 'high_bits' was declared here u8 high_bits; Signed-off-by: Anuj Mittal --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c index 2305448..ec34753 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c @@ -2095,7 +2095,7 @@ STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) bool bit = 0; DEBUGFUNC("ixgbe_clock_in_i2c_byte"); - + *data = 0; for (i = 7; i >= 0; i--) { ixgbe_clock_in_i2c_bit(hw, &bit); *data |= bit << i; -- 1.7.9.5