summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-11-18 08:17:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-21 07:11:00 (GMT)
commitb9c506f7d9f05a630fa7e31b77a9cf5081d7dbba (patch)
treec5000e373f2a201915ea91dbba1cb8f2e91787eb /transport.c
parent2ce1a1f23fd83d2cab22f87aff1165fb0c7ad450 (diff)
downloadgit-b9c506f7d9f05a630fa7e31b77a9cf5081d7dbba.zip
git-b9c506f7d9f05a630fa7e31b77a9cf5081d7dbba.tar.gz
git-b9c506f7d9f05a630fa7e31b77a9cf5081d7dbba.tar.bz2
avoid "defined but not used" warning for fetch_objs_via_walker
Because this function is static and used only by the http-walker, when NO_CURL is defined, gcc emits a "defined but not used" warning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index e8a2608..43b9e7c 100644
--- a/transport.c
+++ b/transport.c
@@ -344,6 +344,7 @@ static int rsync_transport_push(struct transport *transport,
/* Generic functions for using commit walkers */
+#ifndef NO_CURL /* http fetch is the only user */
static int fetch_objs_via_walker(struct transport *transport,
int nr_objs, struct ref **to_fetch)
{
@@ -370,6 +371,7 @@ static int fetch_objs_via_walker(struct transport *transport,
free(dest);
return 0;
}
+#endif /* NO_CURL */
static int disconnect_walker(struct transport *transport)
{