negotiator/noop: mark unused callback parameters
The noop negotiator unsurprisingly does not bother looking at any of its parameters. Mark them unused to silence -Wunused-parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Aug 29, 2023 at 19:45 UTC
06b217fc1ffba3c5f268e257b8ee9d42bbf7588d
1 file changed
+7
-5
negotiator/noop.c
+7
-5
@@ -3,22 +3,24 @@
3
#include "../commit.h"
4
#include "../fetch-negotiator.h"
5
6
-static void known_common(struct fetch_negotiator *n, struct commit *c)
6
+static void known_common(struct fetch_negotiator *n UNUSED,
7
+ struct commit *c UNUSED)
8
{
9
/* do nothing */
10
}
11
11
-static void add_tip(struct fetch_negotiator *n, struct commit *c)
12
+static void add_tip(struct fetch_negotiator *n UNUSED,
13
+ struct commit *c UNUSED)
14
{
15
/* do nothing */
16
}
17
16
-static const struct object_id *next(struct fetch_negotiator *n)
18
+static const struct object_id *next(struct fetch_negotiator *n UNUSED)
19
{
20
return NULL;
21
}
22
21
-static int ack(struct fetch_negotiator *n, struct commit *c)
23
+static int ack(struct fetch_negotiator *n UNUSED, struct commit *c UNUSED)
24
{
25
/*
26
* This negotiator does not emit any commits, so there is no commit to
@@ -28,7 +30,7 @@ static int ack(struct fetch_negotiator *n, struct commit *c)
30
return 0;
31
}
32
31
-static void release(struct fetch_negotiator *n)
33
+static void release(struct fetch_negotiator *n UNUSED)
34
{
35
/* nothing to release */
36
}