Skip to content

Commit b9c506f

Browse files
peffgitster
authored andcommitted
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>
1 parent 2ce1a1f commit b9c506f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

transport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ static int rsync_transport_push(struct transport *transport,
344344

345345
/* Generic functions for using commit walkers */
346346

347+
#ifndef NO_CURL /* http fetch is the only user */
347348
static int fetch_objs_via_walker(struct transport *transport,
348349
int nr_objs, struct ref **to_fetch)
349350
{
@@ -370,6 +371,7 @@ static int fetch_objs_via_walker(struct transport *transport,
370371
free(dest);
371372
return 0;
372373
}
374+
#endif /* NO_CURL */
373375

374376
static int disconnect_walker(struct transport *transport)
375377
{

0 commit comments

Comments
 (0)