git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] builtin/tag.c: Fix a sparse warning

From
Tom Grennan <tmgrennan@gmail.com>
Date
Feb 13, 2012, 19:15 UTC
Message-ID
<20120213191459.GA2707@tgrennan-laptop>
In-Reply-To
<4F395569.8030106@ramsay1.demon.co.uk>
On Mon, Feb 13, 2012 at 06:24:41PM +0000, Ramsay Jones wrote:
Show 12 quoted lines
>
>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
Show 22 quoted lines
>---
>
> 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
>
>
Previous: Ramsay Jones
Message 2 of 2 in “builtin/tag.c: Fix a sparse warning”
  1. builtin/tag.c: Fix a sparse warningRamsay Jones, Feb 13, 2012
  2. Tom GrennanFeb 13, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.