* [PATCH] builtin/reset.c: Fix a sparse warning
@ 2013-01-14 19:28 Ramsay Jones
2013-01-14 19:35 ` Martin von Zweigbergk
0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2013-01-14 19:28 UTC (permalink / raw)
To: martinvonz; +Cc: GIT Mailing-list
In particular, sparse issues an "symbol not declared. Should it be
static?" warning for the 'parse_args' function. Since this function
does not require greater than file visibility, we suppress this
warning by simply adding the static modifier to it's decalaration.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Martin,
When you re-roll your "reset" patches (branch 'mz/reset-misc'), could
you please squash this into commit b24b3654 ("reset.c: extract function
for parsing arguments", 09-01-2013). Note that this patch is on top of
the pu branch (@75ea4ed3), which includes Junio's style fix patch
(commit 9f45c39f, "[SQUASH???] style fix", 10-01-2013).
Thanks!
ATB,
Ramsay Jones
builtin/reset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index a37044e..c69f9da 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -171,7 +171,7 @@ static void die_if_unmerged_cache(int reset_type)
}
-const char **parse_args(int argc, const char **argv, const char *prefix, const char **rev_ret)
+static const char **parse_args(int argc, const char **argv, const char *prefix, const char **rev_ret)
{
const char *rev = "HEAD";
unsigned char unused[20];
--
1.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] builtin/reset.c: Fix a sparse warning
2013-01-14 19:28 [PATCH] builtin/reset.c: Fix a sparse warning Ramsay Jones
@ 2013-01-14 19:35 ` Martin von Zweigbergk
0 siblings, 0 replies; 2+ messages in thread
From: Martin von Zweigbergk @ 2013-01-14 19:35 UTC (permalink / raw)
To: Ramsay Jones; +Cc: GIT Mailing-list
On Mon, Jan 14, 2013 at 11:28 AM, Ramsay Jones
<ramsay@ramsay1.demon.co.uk> wrote:
>
> In particular, sparse issues an "symbol not declared. Should it be
> static?" warning for the 'parse_args' function. Since this function
> does not require greater than file visibility, we suppress this
> warning by simply adding the static modifier to it's decalaration.
Oops, how did I miss that? Will fix in re-roll. Thanks.
Martin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-14 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 19:28 [PATCH] builtin/reset.c: Fix a sparse warning Ramsay Jones
2013-01-14 19:35 ` Martin von Zweigbergk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox