Code

n is in fact unused, and is later shadowed.
authorPierre Habouzit <madcoder@debian.org>
Wed, 23 Aug 2006 10:39:16 +0000 (12:39 +0200)
committerJunio C Hamano <junkio@cox.net>
Thu, 24 Aug 2006 01:47:39 +0000 (18:47 -0700)
date.c::approxidate_alpha() counts the number of alphabets
while moving the pointer but does not use the count.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
date.c

diff --git a/date.c b/date.c
index 66be23ab21ef855ecbadeceae1dea2972efd4c2f..d780846b664530111a7bb67229987f202825e66d 100644 (file)
--- a/date.c
+++ b/date.c
@@ -584,10 +584,10 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, int *num)
        const struct typelen *tl;
        const struct special *s;
        const char *end = date;
-       int n = 1, i;
+       int i;
 
-       while (isalpha(*++end))
-               n++;
+       while (isalpha(*++end));
+               ;
 
        for (i = 0; i < 12; i++) {
                int match = match_string(date, month_names[i]);