threads / patch / 35610

patch, 2 partssend-pack.c: mark a file-local function static

Subject: [PATCH 1/2] send-pack.c: mark a file-local function static

## tl;dr

One message between Jan 5, 2014 and Jan 5, 2014. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ramsay Jones· Jan 5, 2014, 23:55 UTC · lore

Commit f2c681cf ("send-pack: support pushing from a shallow clone via http", 05-12-2013) adds the 'advertise_shallow_grafts_buf' function as an external symbol.

Noticed by sparse. ("'advertise_shallow_grafts_buf' was not declared. Should it be static?")

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 send-pack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to send-pack.c +1 −1
diff --git a/send-pack.c b/send-pack.c
index 2a199cc..6129b0f 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -183,7 +183,7 @@ static int advertise_shallow_grafts_cb(const struct commit_graft *graft, void *c
 	return 0;
 }
 
-void advertise_shallow_grafts_buf(struct strbuf *sb)
+static void advertise_shallow_grafts_buf(struct strbuf *sb)
 {
 	if (!is_repository_shallow())
 		return;
-- 
1.8.5

← back to recent threads