]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix or supress various sparse warnings
authorJohannes Berg <johannes.berg@intel.com>
Thu, 26 Jan 2017 12:09:25 +0000 (13:09 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 29 Jan 2017 16:33:10 +0000 (18:33 +0200)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
src/ap/taxonomy.c
src/fst/fst_iface.h
src/rsn_supp/tdls.c
wpa_supplicant/rrm.c
wpa_supplicant/wpa_supplicant.c

index cea8b726f47af750d51c6c321f0224556457dc87..ae157a7c91d6d749bdbdcc1da3e7ab5d430fb3a7 100644 (file)
@@ -21,6 +21,7 @@
 #include "common/wpa_ctrl.h"
 #include "hostapd.h"
 #include "sta_info.h"
+#include "taxonomy.h"
 
 
 /* Copy a string with no funny schtuff allowed; only alphanumerics. */
index 0eb27325a2b882ab1043fa9a99bd973bbd9a6979..cbaa7d81788d99802de5272d6b26ab2347ec5aaf 100644 (file)
@@ -106,7 +106,7 @@ static inline void fst_iface_update_mb_ie(struct fst_iface *i,
                                          const u8 *addr,
                                          const u8 *buf, size_t size)
 {
-       return i->iface_obj.update_mb_ie(i->iface_obj.ctx, addr, buf, size);
+       i->iface_obj.update_mb_ie(i->iface_obj.ctx, addr, buf, size);
 }
 
 static inline const u8 * fst_iface_get_peer_first(struct fst_iface *i,
index f57311e8bfab7e08c4a84e16b8870dabb55a2856..e4ac24ff2b92274c130f2f0706c37c1c884c71fa 100644 (file)
@@ -1201,9 +1201,10 @@ skip_ies:
 
 #ifdef CONFIG_TDLS_TESTING
        if (tdls_testing & TDLS_TESTING_DIFF_BSSID) {
+               struct wpa_tdls_lnkid *l = (struct wpa_tdls_lnkid *) pos;
+
                wpa_printf(MSG_DEBUG, "TDLS: Testing - use incorrect BSSID in "
                           "Link Identifier");
-               struct wpa_tdls_lnkid *l = (struct wpa_tdls_lnkid *) pos;
                wpa_tdls_linkid(sm, peer, l);
                l->bssid[5] ^= 0x01;
                pos += sizeof(*l);
index 92cc8ce275825450e8ae373f50f5b36fe79e80c1..36a8336e7a88987061ce19096440e42476df824e 100644 (file)
@@ -633,8 +633,8 @@ static int * wpas_beacon_request_freqs(struct wpa_supplicant *wpa_s,
 }
 
 
-int wpas_get_op_chan_phy(int freq, const u8 *ies, size_t ies_len,
-                        u8 *op_class, u8 *chan, u8 *phy_type)
+static int wpas_get_op_chan_phy(int freq, const u8 *ies, size_t ies_len,
+                               u8 *op_class, u8 *chan, u8 *phy_type)
 {
        const u8 *ie;
        int sec_chan = 0, vht = 0;
index 83c5e94df2423ebef963d5b02387be796c9d1890..e48439bde1327eb474e389753df1c8c22e7ae550 100644 (file)
@@ -3769,8 +3769,11 @@ static int wpa_set_htcap_mcs(struct wpa_supplicant *wpa_s,
        wpa_msg(wpa_s, MSG_DEBUG, "set_htcap, ht_mcs -:%s:-", ht_mcs);
 
        for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) {
+               long v;
+
                errno = 0;
-               long v = strtol(tmp, &end, 16);
+               v = strtol(tmp, &end, 16);
+
                if (errno == 0) {
                        wpa_msg(wpa_s, MSG_DEBUG,
                                "htcap value[%i]: %ld end: %p  tmp: %p",