summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: accccde)
raw | patch | inline | side by side (parent: accccde)
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | |
Sun, 4 Mar 2012 19:10:57 +0000 (19:10 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 Mar 2012 05:17:25 +0000 (21:17 -0800) |
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>
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>
cache.h | patch | blob | history | |
git-compat-util.h | patch | blob | history |
index 79dc30574ef2c4c78422864733d036abbccfb1fa..79c612fc2f51a5adf059a7a9ec2b8e7882388faa 100644 (file)
--- a/cache.h
+++ b/cache.h
/* 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 230e198fc35390fbccb496d2b74425382439dc4a..ac0a87bdb9c77eb7a8321e5c63af7e73d726d62e 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
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