Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
config: squelch stupid compiler
Some compilers do not realize that *cp is always '.' when the loop
to find the last dot begins, and instead gives a useless warning
that says last_dot may be uninitialized.

Squelch it by being a bit more explicit if stupid.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed Feb 21, 2017
1 parent 39b1230 commit f8c5d13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.c
Expand Up @@ -239,7 +239,7 @@ static int canonicalize_config_variable_name(char *varname)
return -1; /* no section? */

/* find the last dot (we start from the first dot we just found) */
for (; *cp; cp++)
for (last_dot = cp; *cp; cp++)
if (*cp == '.')
last_dot = cp;

Expand Down

0 comments on commit f8c5d13

Please sign in to comment.