aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-04-04 14:15:23 -0400
committerMattias Nissler <mnissler@google.com>2016-07-20 16:18:38 +0200
commit1ea37a6692fd83272c4631c1165b4340673d6537 (patch)
treeea2820fc71a22190bfabf5ac1c9bfe09d321d765
parent33d343ff4da43bab14d41ce57408eb7e9e3802c9 (diff)
downloadv4.4-1ea37a6692fd83272c4631c1165b4340673d6537.tar.gz
UPSTREAM: mac80211: fix "warning: ‘target_metric’ may be used uninitialized"
This fixes: net/mac80211/mesh_hwmp.c:603:26: warning: ‘target_metric’ may be used uninitialized in this function target_metric is only consumed when reply = true so no bug exists here, but not all versions of gcc realize it. Initialize to 0 to remove the warning. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Bug: None Patchset: net-mac80211-target-metric-warning (cherry-picked from b4201cc4fc6e1c57d6d306b1f787865043d60129) Signed-off-by: Mattias Nissler <mnissler@google.com> Change-Id: Iee90826d8a0b7db8eb2e19c3e567dfe779c99f7a
-rw-r--r--net/mac80211/mesh_hwmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index c6be0b4f4058..b6dc2d7cd650 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -530,7 +530,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
const u8 *target_addr, *orig_addr;
const u8 *da;
u8 target_flags, ttl, flags;
- u32 orig_sn, target_sn, lifetime, target_metric;
+ u32 orig_sn, target_sn, lifetime, target_metric = 0;
bool reply = false;
bool forward = true;
bool root_is_gate;