git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] revision.c: Fix a sparse warning
@ 2013-05-04 17:25 Ramsay Jones
  2013-05-04 18:13 ` Kevin Bracey
  0 siblings, 1 reply; 4+ messages in thread
From: Ramsay Jones @ 2013-05-04 17:25 UTC (permalink / raw)
  To: kevin; +Cc: Junio C Hamano, GIT Mailing-list


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

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

Hi Kevin,

If you need to re-roll your 'kb/full-history-compute-treesame-carefully'
branch, could you please squash this into commit 039bdad1 ("revision.c:
discount UNINTERESTING parents", 30-04-2013).

Thanks!

ATB,
Ramsay Jones

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

diff --git a/revision.c b/revision.c
index dd48c55..60c8d8c 100644
--- a/revision.c
+++ b/revision.c
@@ -349,7 +349,7 @@ static int everybody_uninteresting(struct commit_list *orig)
  * (and multiple UNINTERESTING ones), then we can't choose a parent to follow,
  * and we should not be simplified.
  */
-struct commit *sole_interesting(struct rev_info *revs, struct commit_list *orig)
+static struct commit *sole_interesting(struct rev_info *revs, struct commit_list *orig)
 {
 	struct commit_list *list = orig;
 	struct commit *interesting = NULL;
-- 
1.8.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] revision.c: Fix a sparse warning
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Bracey @ 2013-05-04 18:13 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list

On 04/05/2013 20:25, Ramsay Jones wrote:
> Sparse issues an "'sole_interesting' not declared. Should it be static?"
> warning. In order to suppress the warning, since this symbol does not
> need more than file visibility, we simply add the static modifier to
> its declaration.
>
>
Thanks! I'll include that fix.

Kevin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] revision.c: Fix a sparse warning
  2013-05-04 18:13 ` Kevin Bracey
@ 2013-05-07  1:21   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2013-05-07  1:21 UTC (permalink / raw)
  To: Kevin Bracey; +Cc: Ramsay Jones, GIT Mailing-list

Kevin Bracey <kevin@bracey.fi> writes:

> On 04/05/2013 20:25, Ramsay Jones wrote:
>> Sparse issues an "'sole_interesting' not declared. Should it be static?"
>> warning. In order to suppress the warning, since this symbol does not
>> need more than file visibility, we simply add the static modifier to
>> its declaration.
>>
>>
> Thanks! I'll include that fix.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] revision.c: Fix a sparse warning
@ 2013-07-27 18:39 Ramsay Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Ramsay Jones @ 2013-07-27 18:39 UTC (permalink / raw)
  To: trast; +Cc: Junio C Hamano, GIT Mailing-list


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-27 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2013-07-27 18:39 Ramsay Jones

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).