From: Jouni Malinen Date: Sat, 1 Aug 2015 14:03:12 +0000 (+0300) Subject: P2P: Silence bogus compiler warnings X-Git-Tag: hostap_2_5~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b86d77bae6c3a59f513c49f8d7a1f429f926e25;p=thirdparty%2Fhostap.git P2P: Silence bogus compiler warnings It looks like the compiler version used in Android 5.0 warns about potentially uninitialized oper_freq variable in these debug messages. That is not really valid since this code path can be reached only if found != 0 and in such a case, oper_freq is set. Anyway, it seems better to avoid compiler warnings, so add an unnecessary initialization for oper_freq for now. Signed-off-by: Jouni Malinen --- diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index ab2251113..4322bbbbb 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -551,7 +551,7 @@ static void p2p_check_pref_chan_no_recv(struct p2p_data *p2p, int go, unsigned freq_list[], unsigned int size) { u8 op_class, op_channel; - unsigned int oper_freq, i, j; + unsigned int oper_freq = 0, i, j; int found = 0; p2p_dbg(p2p, @@ -614,7 +614,7 @@ static void p2p_check_pref_chan_recv(struct p2p_data *p2p, int go, unsigned freq_list[], unsigned int size) { u8 op_class, op_channel; - unsigned int oper_freq, i, j; + unsigned int oper_freq = 0, i, j; int found = 0; /*