avoid "defined but not used" warning for fetch_objs_via_walker
authorJeff King <peff@peff.net>
Sun, 18 Nov 2007 08:17:23 +0000 (03:17 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Nov 2007 07:11:00 +0000 (23:11 -0800)
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>
transport.c

index e8a2608372de06ef3f77d9a450776e3095057c9f..43b9e7c410882d82fd6b08532e30df9b82b3ffb1 100644 (file)
@@ -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)
 {