threads / patch / 33725

patchrevision.c: Fix a sparse warning

Subject: [PATCH] revision.c: Fix a sparse warning

## tl;dr

3 messages between May 4, 2013 and May 7, 2013. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Ramsay Jones· May 4, 2013, 17:25 UTC · lore

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(-)
Show changes to revision.c +1 −1
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
Kevin Bracey· May 4, 2013, 18:13 UTC · re: Ramsay Jones · lore

Re: [PATCH] revision.c: Fix a sparse warning

On 04/05/2013 20:25, Ramsay Jones wrote:
Show 6 quoted lines
> 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
Junio C Hamano· May 7, 2013, 01:21 UTC · re: Kevin Bracey · lore

Re: [PATCH] revision.c: Fix a sparse warning

Kevin Bracey <kevin@bracey.fi> writes:
Show 8 quoted lines
> 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.

← back to recent threads