public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1•demon.co.uk>
To: trast@inf•ethz.ch
Cc: Junio C Hamano <gitster@pobox•com>,
	GIT Mailing-list <git@vger•kernel.org>
Subject: [PATCH] revision.c: Fix a sparse warning
Date: Sat, 27 Jul 2013 19:39:31 +0100	[thread overview]
Message-ID: <51F413E3.7000608@ramsay1.demon.co.uk> (raw)


Sparse issues an "symbol 'saved_parents_slab' was not declared. Should
it be static?" warning. In order to suppress the warning, since this
symbol does not require more than file visibility, we simply add the
static modifier to its declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1•demon.co.uk>
---

Hi Thomas,

In addition to the gcc warning, sparse weighs in with this warning,
provoked by commit 3b3d83e5 ("[PERHAPS LIKE THIS] log: use true parents
for diff even when rewriting", 22-07-2013).

If you update this commit, could you please squash this into the new patch.

Thanks!

ATB,
Ramsay Jones

 revision.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/revision.c b/revision.c
index f242363..fa355d0 100644
--- a/revision.c
+++ b/revision.c
@@ -3074,7 +3074,7 @@ void put_revision_mark(const struct rev_info *revs, const struct commit *commit)
 }
 
 define_commit_slab(saved_parents, struct commit_list *);
-struct saved_parents saved_parents_slab;
+static struct saved_parents saved_parents_slab;
 static int saved_parents_initialized;
 
 void save_parents(struct commit *commit)
-- 
1.8.3

             reply	other threads:[~2013-07-27 19:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-27 18:39 Ramsay Jones [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-04 17:25 [PATCH] revision.c: Fix a sparse warning Ramsay Jones
2013-05-04 18:13 ` Kevin Bracey
2013-05-07  1:21   ` Junio C Hamano

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=51F413E3.7000608@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1$(echo .)demon.co.uk \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=trast@inf$(echo .)ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox