{"thread":{"id":"29616","subject":"[PATCH] builtin/tag.c: Fix a sparse warning","startedAt":"2012-02-13T18:24:41Z","lastAt":"2012-02-13T19:15:00Z","messageCount":2,"participants":["Ramsay Jones","Tom Grennan"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"184579","messageId":"4F395569.8030106@ramsay1.demon.co.uk","threadId":"29616","inReplyTo":null,"subject":"[PATCH] builtin/tag.c: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-02-13T18:24:41Z","receivedAt":"2012-02-13T18:24:41Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIn particular, sparse complains as follows:\n\n        SP builtin/tag.c\n    builtin/tag.c:411:5: warning: symbol 'parse_opt_points_at' was \\\n        not declared. Should it be static?\n\nIn order to suppress the warning, since the parse_opt_points_at()\nfunction does not need to be an external symbol, we simply add the\nstatic modifier to the function definition.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\n builtin/tag.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex 8cfaaf8..fe7e5e5 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -408,7 +408,7 @@ static int strbuf_check_tag_ref(struct strbuf *sb, const char *name)\n \treturn check_refname_format(sb->buf, 0);\n }\n \n-int parse_opt_points_at(const struct option *opt __attribute__ ((unused)),\n+static int parse_opt_points_at(const struct option *opt __attribute__((unused)),\n \t\t\tconst char *arg, int unset)\n {\n \tunsigned char sha1[20];\n-- \n1.7.9\n"},{"id":"184588","messageId":"20120213191459.GA2707@tgrennan-laptop","threadId":"29616","inReplyTo":"4F395569.8030106@ramsay1.demon.co.uk","subject":"Re: [PATCH] builtin/tag.c: Fix a sparse warning","fromName":"Tom Grennan","fromEmail":"tmgrennan@gmail.com","sentAt":"2012-02-13T19:15:00Z","receivedAt":"2012-02-13T19:15:00Z","isPatch":true,"sender":{"key":"tmgrennan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/422771?v=4"},"body":"On Mon, Feb 13, 2012 at 06:24:41PM +0000, Ramsay Jones wrote:\n>\n>In particular, sparse complains as follows:\n>\n>        SP builtin/tag.c\n>    builtin/tag.c:411:5: warning: symbol 'parse_opt_points_at' was \\\n>        not declared. Should it be static?\n>\n>In order to suppress the warning, since the parse_opt_points_at()\n>function does not need to be an external symbol, we simply add the\n>static modifier to the function definition.\n>\n>Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n\nAcked-by: Tom Grennan <tmgrennan@gmail.com>\n\nThanks\n\n>---\n>\n> builtin/tag.c |    2 +-\n> 1 files changed, 1 insertions(+), 1 deletions(-)\n>\n>diff --git a/builtin/tag.c b/builtin/tag.c\n>index 8cfaaf8..fe7e5e5 100644\n>--- a/builtin/tag.c\n>+++ b/builtin/tag.c\n>@@ -408,7 +408,7 @@ static int strbuf_check_tag_ref(struct strbuf *sb, const char *name)\n> \treturn check_refname_format(sb->buf, 0);\n> }\n> \n>-int parse_opt_points_at(const struct option *opt __attribute__ ((unused)),\n>+static int parse_opt_points_at(const struct option *opt __attribute__((unused)),\n> \t\t\tconst char *arg, int unset)\n> {\n> \tunsigned char sha1[20];\n>-- \n>1.7.9\n>\n>\n"}]}