From: Masashi Honma Date: Mon, 6 Feb 2017 11:07:44 +0000 (+0900) Subject: hs20-osu-client: Hide a trivial compiler warning X-Git-Tag: hostap_2_7~1665 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00e0f0b010d1ede25642c21f0256e27a13b15bb1;p=thirdparty%2Fhostap.git hs20-osu-client: Hide a trivial compiler warning This patch hides a compiler warning: osu_client.c: In function ‘cmd_osu_select’: osu_client.c:2200:2: warning: ‘osu_count’ may be used uninitialized in this function [-Wmaybe-uninitialized] for (i = 0; i < osu_count; i++) { ^ osu_count is actually initialized in parse_osu_providers() if non-NULL value is returned. Signed-off-by: Masashi Honma --- diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c index c05c57d44..d73feb14b 100644 --- a/hs20/client/osu_client.c +++ b/hs20/client/osu_client.c @@ -2134,7 +2134,7 @@ static int cmd_osu_select(struct hs20_osu_client *ctx, const char *dir, char fname[255]; FILE *f; struct osu_data *osu = NULL, *last = NULL; - size_t osu_count, i, j; + size_t osu_count = 0, i, j; int ret; write_summary(ctx, "OSU provider selection");