git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/2] ref-filter: mark a file-local symbol as static
@ 2018-03-02  2:54 Ramsay Jones
  2018-03-02  3:59 ` Jonathan Nieder
  0 siblings, 1 reply; 5+ messages in thread
From: Ramsay Jones @ 2018-03-02  2:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: ungureanupaulsebastian, GIT Mailing-list


Commit fcfba37337 ('ref-filter: make "--contains <id>" less chatty if
<id> is invalid', 2018-02-23) added the add_str_to_commit_list()
function, which causes sparse to issue a "... not declared. Should it
be static?" warning for that symbol.

In order to suppress the warning, mark that function as static.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
 ref-filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ref-filter.c b/ref-filter.c
index f375e7670..69bf7b587 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -2000,7 +2000,7 @@ static void do_merge_filter(struct ref_filter_cbdata *ref_cbdata)
 	free(to_clear);
 }
 
-int add_str_to_commit_list(struct string_list_item *item, void *commit_list)
+static int add_str_to_commit_list(struct string_list_item *item, void *commit_list)
 {
 	struct object_id oid;
 	struct commit *commit;
-- 
2.16.0

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

end of thread, other threads:[~2018-03-02 17:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02  2:54 [PATCH 1/2] ref-filter: mark a file-local symbol as static Ramsay Jones
2018-03-02  3:59 ` Jonathan Nieder
2018-03-02 17:06   ` Ramsay Jones
2018-03-02 17:19     ` Junio C Hamano
2018-03-02 17:56       ` Ramsay Jones

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).