All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: martinvonz@gmail.com
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH] builtin/reset.c: Fix a sparse warning
Date: Mon, 14 Jan 2013 19:28:59 +0000	[thread overview]
Message-ID: <50F45C7B.9030608@ramsay1.demon.co.uk> (raw)


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

             reply	other threads:[~2013-01-14 19:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 19:28 Ramsay Jones [this message]
2013-01-14 19:35 ` [PATCH] builtin/reset.c: Fix a sparse warning Martin von Zweigbergk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F45C7B.9030608@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1.demon.co.uk \
    --cc=git@vger.kernel.org \
    --cc=martinvonz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.