Skip to content

Commit 44ad082

Browse files
peffgitster
authored andcommitted
update-ref: mark unused parameter in parser callbacks
The parsing of stdin is driven by a table of function pointers; mark unused parameters in concrete functions to avoid -Wunused-parameter warnings. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 316b3a2 commit 44ad082

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

builtin/update-ref.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ static void report_ok(const char *command)
311311
fflush(stdout);
312312
}
313313

314-
static void parse_cmd_option(struct ref_transaction *transaction,
315-
const char *next, const char *end)
314+
static void parse_cmd_option(struct ref_transaction *transaction UNUSED,
315+
const char *next, const char *end UNUSED)
316316
{
317317
const char *rest;
318318
if (skip_prefix(next, "no-deref", &rest) && *rest == line_termination)
@@ -321,16 +321,16 @@ static void parse_cmd_option(struct ref_transaction *transaction,
321321
die("option unknown: %s", next);
322322
}
323323

324-
static void parse_cmd_start(struct ref_transaction *transaction,
325-
const char *next, const char *end)
324+
static void parse_cmd_start(struct ref_transaction *transaction UNUSED,
325+
const char *next, const char *end UNUSED)
326326
{
327327
if (*next != line_termination)
328328
die("start: extra input: %s", next);
329329
report_ok("start");
330330
}
331331

332332
static void parse_cmd_prepare(struct ref_transaction *transaction,
333-
const char *next, const char *end)
333+
const char *next, const char *end UNUSED)
334334
{
335335
struct strbuf error = STRBUF_INIT;
336336
if (*next != line_termination)
@@ -341,7 +341,7 @@ static void parse_cmd_prepare(struct ref_transaction *transaction,
341341
}
342342

343343
static void parse_cmd_abort(struct ref_transaction *transaction,
344-
const char *next, const char *end)
344+
const char *next, const char *end UNUSED)
345345
{
346346
struct strbuf error = STRBUF_INIT;
347347
if (*next != line_termination)
@@ -352,7 +352,7 @@ static void parse_cmd_abort(struct ref_transaction *transaction,
352352
}
353353

354354
static void parse_cmd_commit(struct ref_transaction *transaction,
355-
const char *next, const char *end)
355+
const char *next, const char *end UNUSED)
356356
{
357357
struct strbuf error = STRBUF_INIT;
358358
if (*next != line_termination)

0 commit comments

Comments
 (0)