summaryrefslogtreecommitdiffstats
path: root/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-and-2.0.0-ixgbe-fix-a-build-warning-being-treated-as-error.patch
blob: fef9108dc095d93748d7eef63077889054df3f84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From a635f49a5873a104c8867bd1f6375d7a5064be5e Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
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 <anujx.mittal@intel.com>
---
 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