aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Ostruszka <aostruszka@marvell.com>2019-11-07 15:03:15 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2021-09-17 21:24:54 +0000
commit089cdb3990f47be3cd34d1a57567a2e89c917929 (patch)
tree4c639b13a26b557e37f20eb450f8431fd5a7b253
parentecf2a89a997ad4a14339b6a2f544e44b422620a0 (diff)
downloadsrc-089cdb3990f47be3cd34d1a57567a2e89c917929.tar.gz
src-089cdb3990f47be3cd34d1a57567a2e89c917929.zip
e1000: clean LTO warnings
During LTO build compiler reports some 'false positive' warnings about variables being possibly used uninitialized. This patch silences these warnings. Exemplary compiler warning to suppress (with LTO enabled): error: 'link' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (link) { Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com> Approved by: imp Obtained from: DPDK (46136031f19107f4e9b6b3a952cb7f57877a7f0f) MFC after: 1 week
-rw-r--r--sys/dev/e1000/e1000_82543.c2
-rw-r--r--sys/dev/e1000/e1000_ich8lan.c2
-rw-r--r--sys/dev/e1000/e1000_phy.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/e1000/e1000_82543.c b/sys/dev/e1000/e1000_82543.c
index 42c4726fa8c7..49049b8646cd 100644
--- a/sys/dev/e1000/e1000_82543.c
+++ b/sys/dev/e1000/e1000_82543.c
@@ -1062,7 +1062,7 @@ static s32 e1000_setup_copper_link_82543(struct e1000_hw *hw)
{
u32 ctrl;
s32 ret_val;
- bool link;
+ bool link = true;
DEBUGFUNC("e1000_setup_copper_link_82543");
diff --git a/sys/dev/e1000/e1000_ich8lan.c b/sys/dev/e1000/e1000_ich8lan.c
index 8ca0fb392805..635be03f2900 100644
--- a/sys/dev/e1000/e1000_ich8lan.c
+++ b/sys/dev/e1000/e1000_ich8lan.c
@@ -5620,7 +5620,7 @@ void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw)
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw)
{
s32 ret_val;
- u16 reg_data;
+ u16 reg_data = 0;
DEBUGFUNC("e1000_gig_downshift_workaround_ich8lan");
diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c
index d84b6120dd31..2eae3acbe500 100644
--- a/sys/dev/e1000/e1000_phy.c
+++ b/sys/dev/e1000/e1000_phy.c
@@ -1695,7 +1695,7 @@ s32 e1000_copper_link_autoneg(struct e1000_hw *hw)
s32 e1000_setup_copper_link_generic(struct e1000_hw *hw)
{
s32 ret_val;
- bool link;
+ bool link = true;
DEBUGFUNC("e1000_setup_copper_link_generic");