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>
Jeff King committed
Nov 18, 2007 at 03:17 UTC
b9c506f7d9f05a630fa7e31b77a9cf5081d7dbba
1 file changed
+2
transport.c
+2
@@ -344,6 +344,7 @@ static int rsync_transport_push(struct transport *transport,
344
345
/* Generic functions for using commit walkers */
346
347
+#ifndef NO_CURL /* http fetch is the only user */
348
static int fetch_objs_via_walker(struct transport *transport,
349
int nr_objs, struct ref **to_fetch)
350
{
@@ -370,6 +371,7 @@ static int fetch_objs_via_walker(struct transport *transport,
371
free(dest);
372
return 0;
373
}
374
+#endif /* NO_CURL */
375
376
static int disconnect_walker(struct transport *transport)
377
{