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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
							parent
							
								
									316b3a226a
								
							
						
					
					
						commit
						44ad082968
					
				|  | @ -311,8 +311,8 @@ static void report_ok(const char *command) | ||||||
| 	fflush(stdout); | 	fflush(stdout); | ||||||
| } | } | ||||||
|  |  | ||||||
| static void parse_cmd_option(struct ref_transaction *transaction, | static void parse_cmd_option(struct ref_transaction *transaction UNUSED, | ||||||
| 			     const char *next, const char *end) | 			     const char *next, const char *end UNUSED) | ||||||
| { | { | ||||||
| 	const char *rest; | 	const char *rest; | ||||||
| 	if (skip_prefix(next, "no-deref", &rest) && *rest == line_termination) | 	if (skip_prefix(next, "no-deref", &rest) && *rest == line_termination) | ||||||
|  | @ -321,8 +321,8 @@ static void parse_cmd_option(struct ref_transaction *transaction, | ||||||
| 		die("option unknown: %s", next); | 		die("option unknown: %s", next); | ||||||
| } | } | ||||||
|  |  | ||||||
| static void parse_cmd_start(struct ref_transaction *transaction, | static void parse_cmd_start(struct ref_transaction *transaction UNUSED, | ||||||
| 			    const char *next, const char *end) | 			    const char *next, const char *end UNUSED) | ||||||
| { | { | ||||||
| 	if (*next != line_termination) | 	if (*next != line_termination) | ||||||
| 		die("start: extra input: %s", next); | 		die("start: extra input: %s", next); | ||||||
|  | @ -330,7 +330,7 @@ static void parse_cmd_start(struct ref_transaction *transaction, | ||||||
| } | } | ||||||
|  |  | ||||||
| static void parse_cmd_prepare(struct ref_transaction *transaction, | static void parse_cmd_prepare(struct ref_transaction *transaction, | ||||||
| 			      const char *next, const char *end) | 			      const char *next, const char *end UNUSED) | ||||||
| { | { | ||||||
| 	struct strbuf error = STRBUF_INIT; | 	struct strbuf error = STRBUF_INIT; | ||||||
| 	if (*next != line_termination) | 	if (*next != line_termination) | ||||||
|  | @ -341,7 +341,7 @@ static void parse_cmd_prepare(struct ref_transaction *transaction, | ||||||
| } | } | ||||||
|  |  | ||||||
| static void parse_cmd_abort(struct ref_transaction *transaction, | static void parse_cmd_abort(struct ref_transaction *transaction, | ||||||
| 			    const char *next, const char *end) | 			    const char *next, const char *end UNUSED) | ||||||
| { | { | ||||||
| 	struct strbuf error = STRBUF_INIT; | 	struct strbuf error = STRBUF_INIT; | ||||||
| 	if (*next != line_termination) | 	if (*next != line_termination) | ||||||
|  | @ -352,7 +352,7 @@ static void parse_cmd_abort(struct ref_transaction *transaction, | ||||||
| } | } | ||||||
|  |  | ||||||
| static void parse_cmd_commit(struct ref_transaction *transaction, | static void parse_cmd_commit(struct ref_transaction *transaction, | ||||||
| 			     const char *next, const char *end) | 			     const char *next, const char *end UNUSED) | ||||||
| { | { | ||||||
| 	struct strbuf error = STRBUF_INIT; | 	struct strbuf error = STRBUF_INIT; | ||||||
| 	if (*next != line_termination) | 	if (*next != line_termination) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Jeff King
						Jeff King