git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Aug 28, 2013, 18:56 UTC
Message-ID
<521E47D1.9060106@ramsay1.demon.co.uk>

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(-)
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
Message 1 of 1 in “builtin/fetch.c: Fix a sparse warning”
  1. builtin/fetch.c: Fix a sparse warningRamsay Jones, Aug 28, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.