* [PATCH] builtin/tag.c: Fix a sparse warning
@ 2012-02-13 18:24 Ramsay Jones
2012-02-13 19:15 ` Tom Grennan
0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2012-02-13 18:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: tmgrennan, GIT Mailing-list
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 <ramsay@ramsay1.demon.co.uk>
---
builtin/tag.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/tag.c b/builtin/tag.c
index 8cfaaf8..fe7e5e5 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -408,7 +408,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];
--
1.7.9
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] builtin/tag.c: Fix a sparse warning
2012-02-13 18:24 [PATCH] builtin/tag.c: Fix a sparse warning Ramsay Jones
@ 2012-02-13 19:15 ` Tom Grennan
0 siblings, 0 replies; 2+ messages in thread
From: Tom Grennan @ 2012-02-13 19:15 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list
On Mon, Feb 13, 2012 at 06:24:41PM +0000, Ramsay Jones wrote:
>
>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 <ramsay@ramsay1.demon.co.uk>
Acked-by: Tom Grennan <tmgrennan@gmail.com>
Thanks
>---
>
> builtin/tag.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/builtin/tag.c b/builtin/tag.c
>index 8cfaaf8..fe7e5e5 100644
>--- a/builtin/tag.c
>+++ b/builtin/tag.c
>@@ -408,7 +408,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];
>--
>1.7.9
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-13 19:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13 18:24 [PATCH] builtin/tag.c: Fix a sparse warning Ramsay Jones
2012-02-13 19:15 ` Tom Grennan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).