Skip to content

Commit 0975a50

Browse files
Ramsay Jonesgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ae7706b commit 0975a50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/tag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static int strbuf_check_tag_ref(struct strbuf *sb, const char *name)
400400
return check_refname_format(sb->buf, 0);
401401
}
402402

403-
int parse_opt_points_at(const struct option *opt __attribute__ ((unused)),
403+
static int parse_opt_points_at(const struct option *opt __attribute__((unused)),
404404
const char *arg, int unset)
405405
{
406406
unsigned char sha1[20];

0 commit comments

Comments
 (0)