summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2012-03-04 19:10:57 +0000
committerJunio C Hamano <gitster@pobox.com>2012-03-04 21:17:25 -0800
commitf1589d100796c58615033dde10c1c6446b814357 (patch)
treef7d50672b174a7a32e6215160fe59b4a3b04d349
parentaccccde483c3cfd55ef55037e8802ca0baaee5a1 (diff)
downloadgit-jc/pickaxe-ignore-case.tar.gz
ctype.c: Fix a sparse warningjc/pickaxe-ignore-case
In particular, sparse complains as follows: SP ctype.c ctype.c:30:12: warning: symbol 'tolower_trans_tbl' was not declared.\ Should it be static? An appropriate extern declaration for the 'tolower_trans_tbl' symbol is included in the "cache.h" header file. In order to suppress the warning, therefore, we could replace the "git-compat-util.h" header inclusion with "cache.h", since "cache.h" includes "git-compat-util.h" in turn. Here, however, we choose to move the extern declaration for 'tolower_trans_tbl' into "git-compat-util.h", alongside the other extern declaration from ctype.c for 'sane_ctype'. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--cache.h3
-rw-r--r--git-compat-util.h3
2 files changed, 3 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index 79dc30574e..79c612fc2f 100644
--- a/cache.h
+++ b/cache.h
@@ -1258,7 +1258,4 @@ extern struct startup_info *startup_info;
/* builtin/merge.c */
int checkout_fast_forward(const unsigned char *from, const unsigned char *to);
-/* in ctype.c, for kwset users */
-extern const char tolower_trans_tbl[256];
-
#endif /* CACHE_H */
diff --git a/git-compat-util.h b/git-compat-util.h
index 230e198fc3..ac0a87bdb9 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -457,6 +457,9 @@ static inline int has_extension(const char *filename, const char *ext)
return len > extlen && !memcmp(filename + len - extlen, ext, extlen);
}
+/* in ctype.c, for kwset users */
+extern const char tolower_trans_tbl[256];
+
/* Sane ctype - no locale, and works with signed chars */
#undef isascii
#undef isspace