[PATCH] wpa_supplicant: fix compile warning

Thomas Pedersen thomas at adapt-ip.com
Thu Aug 27 18:59:19 EDT 2020


"85ca13ebcf15 wpa_cli: Add all_bss command to print all scan results (BSS entries)"
introduced a few compile warnings. Squash them by
initializing the variables.

Signed-off-by: Thomas Pedersen <thomas at adapt-ip.com>
---
 wpa_supplicant/wpa_cli.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index f5b02f662274..1aacaa1f4f3a 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -3082,6 +3082,7 @@ static int wpa_ctrl_command_bss(struct wpa_ctrl *ctrl, const char *cmd)
 	if (os_memcmp(buf, "FAIL", 4) == 0)
 		return -1;
 
+	bssid = freq = level = flags = ssid = NULL;
 	pos = buf;
 	while (*pos != '\0') {
 		if (str_starts(pos, "id="))
-- 
2.20.1




More information about the Hostap mailing list