threads / patch / 34788

patchbuiltin/fetch.c: Fix a sparse warning

Subject: [PATCH] builtin/fetch.c: Fix a sparse warning

## tl;dr

One message between Aug 28, 2013 and Aug 28, 2013. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ramsay Jones· Aug 28, 2013, 18:56 UTC · lore

Sparse issues an "'prepare_transport' was not declared. Should it be static?" warning. In order to suppress the warning, since this symbol only requires file scope, we simply add the static modifier to it's declaration.

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

When you re-build the next branch, could you please squash this into commit db5723c6 ("fetch: refactor code that prepares a transport", 07-08-2013). [from the 'jc/transport-do-not-use-connect-twice-in-fetch' branch]

Thanks!

ATB, Ramsay Jones

 builtin/fetch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to builtin/fetch.c +1 −1
diff --git a/builtin/fetch.c b/builtin/fetch.c
index e880116..9e654ef 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -747,7 +747,7 @@ static void set_option(struct transport *transport, const char *name, const char
 			name, transport->url);
 }
 
-struct transport *prepare_transport(struct remote *remote)
+static struct transport *prepare_transport(struct remote *remote)
 {
 	struct transport *transport;
 	transport = transport_get(remote, NULL);
-- 
1.8.4

← back to recent threads