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 <masashi.honma@gmail.com>
This commit is contained in:
Masashi Honma 2017-02-06 20:07:44 +09:00 committed by Jouni Malinen
parent f366ff24f5
commit 00e0f0b010

View file

@ -2134,7 +2134,7 @@ static int cmd_osu_select(struct hs20_osu_client *ctx, const char *dir,
char fname[255]; char fname[255];
FILE *f; FILE *f;
struct osu_data *osu = NULL, *last = NULL; struct osu_data *osu = NULL, *last = NULL;
size_t osu_count, i, j; size_t osu_count = 0, i, j;
int ret; int ret;
write_summary(ctx, "OSU provider selection"); write_summary(ctx, "OSU provider selection");