From: Jeff King Date: Sun, 18 Nov 2007 08:17:23 +0000 (-0500) Subject: avoid "defined but not used" warning for fetch_objs_via_walker X-Git-Tag: v1.5.4-rc0~169 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b9c506f7d9f05a630fa7e31b77a9cf5081d7dbba;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/transport.c b/transport.c index e8a260837..43b9e7c41 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) {