Commit 5974617d authored by Kristoffer Rist Skøien's avatar Kristoffer Rist Skøien Committed by Christopher Friedt
Browse files

lib: getopt: Fix compiler warning.



current_dash may be used uninitialized

Signed-off-by: default avatarKristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
parent 259ec41c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ parse_long_options(struct getopt_state *state, char * const *nargv,
{
	char *current_argv, *has_equal;
#ifdef GNU_COMPATIBLE
	char *current_dash;
	char *current_dash = "";
#endif
	size_t current_argv_len;
	int i, match, exact_match, second_partial_match;
@@ -191,7 +191,6 @@ parse_long_options(struct getopt_state *state, char * const *nargv,
			current_dash = "-W ";
			break;
		default:
			current_dash = "";
			break;
		}
	}