Skip to content

Commit

Permalink
avoid "defined but not used" warning for fetch_objs_via_walker
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Nov 21, 2007
1 parent 2ce1a1f commit b9c506f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down

0 comments on commit b9c506f

Please sign in to comment.