From ebd5f84955d180b3357f7005762a6cfb42cf1b1c Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Wed, 23 Nov 2022 14:26:41 +0100 Subject: [PATCH] fix -Wmaybe-uninitialized warning All previous cases not hit, which means no scan was possible. Indicate that. Signed-off-by: Andre Heider --- iwinfo_nl80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index 97cd39f..0e339b5 100644 --- a/iwinfo_nl80211.c +++ b/iwinfo_nl80211.c @@ -2899,6 +2899,8 @@ static int nl80211_get_scanlist(const char *ifname, char *buf, int *len) iwinfo_ifup(ifname); nl80211_hostapd_hup(ifname); } + else + rv = -1; nl80211_ifdel(res); return rv;