From: Ramsay Jones Date: Mon, 13 Feb 2012 18:24:41 +0000 (+0000) Subject: builtin/tag.c: Fix a sparse warning X-Git-Tag: v1.7.10-rc0~68^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0975a5020ef050a9fd5b518cbd601e5ee43ddbcf;p=git.git builtin/tag.c: Fix a sparse warning In particular, sparse complains as follows: SP builtin/tag.c builtin/tag.c:411:5: warning: symbol 'parse_opt_points_at' was \ not declared. Should it be static? In order to suppress the warning, since the parse_opt_points_at() function does not need to be an external symbol, we simply add the static modifier to the function definition. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- diff --git a/builtin/tag.c b/builtin/tag.c index 27c35571a..e377706e6 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -400,7 +400,7 @@ static int strbuf_check_tag_ref(struct strbuf *sb, const char *name) return check_refname_format(sb->buf, 0); } -int parse_opt_points_at(const struct option *opt __attribute__ ((unused)), +static int parse_opt_points_at(const struct option *opt __attribute__((unused)), const char *arg, int unset) { unsigned char sha1[20];