diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-02-21 14:26:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-02-21 14:26:10 -0800 |
commit | f8c5d136f1e7dcfaad6698f63d82cc69123ccf5f (patch) | |
tree | c6cd2b9524b3067937bce99fcc9c569b8351856a | |
parent | 39b1230cc5b132f9d807ab0ed682fb16664bc04c (diff) | |
download | git-jc/config-case-cmdline.tar.gz |
config: squelch stupid compilerjc/config-case-cmdline
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>
-rw-r--r-- | config.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |