From: Jouni Malinen Date: Sun, 26 Apr 2015 14:00:26 +0000 (+0300) Subject: Interworking: Fix network selection warning without SIM/USIM support X-Git-Tag: hostap_2_5~791 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f390f431c47bfbde7f97425c0b5e8cf336b4701;p=thirdparty%2Fhostap.git Interworking: Fix network selection warning without SIM/USIM support interworking_credentials_available_3gpp() would have left excluded2 uninitialized without INTERWORKING_3GPP in the build. This could result in a static analyzer warning within interworking_credentials_available_helper() about use of uninitialized variable. Get rid of that warning by explicitly initializing excluded2 even though this does not really result in any difference in behavior since the excluded2 value would be used only if the non-NULL is returned and that could not have been the case here without INTERWORKING_3GPP. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index 4a3966544..35885ee2a 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -2058,7 +2058,7 @@ static struct wpa_cred * interworking_credentials_available_helper( int *excluded) { struct wpa_cred *cred, *cred2; - int excluded1, excluded2; + int excluded1, excluded2 = 0; if (disallowed_bssid(wpa_s, bss->bssid) || disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) {