diff options
author | Jeff King <peff@peff.net> | 2023-08-30 02:45:34 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-08-30 03:56:26 +0300 |
commit | 4548b0145f17c633de5e267b6c7932c72824e9d3 (patch) | |
tree | f9f3a5c084552549df93c6f2c82ce59202becf20 /grep.c | |
parent | 2c3c3d88fcda1558d8d57301c21bd548af71a04e (diff) |
grep: mark unused parmaeters in pcre fallbacks
When USE_LIBPCRE2 is not defined, we compile several noop fallbacks.
These need to have their parameters annotated to avoid
-Wunused-parameter warnings (and obviously we cannot remove the
parameters, since the functions must match the non-fallback versions).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -452,18 +452,20 @@ static void free_pcre2_pattern(struct grep_pat *p) pcre2_general_context_free(p->pcre2_general_context); } #else /* !USE_LIBPCRE2 */ -static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt) +static void compile_pcre2_pattern(struct grep_pat *p UNUSED, + const struct grep_opt *opt UNUSED) { die("cannot use Perl-compatible regexes when not compiled with USE_LIBPCRE"); } -static int pcre2match(struct grep_pat *p, const char *line, const char *eol, - regmatch_t *match, int eflags) +static int pcre2match(struct grep_pat *p UNUSED, const char *line UNUSED, + const char *eol UNUSED, regmatch_t *match UNUSED, + int eflags UNUSED) { return 1; } -static void free_pcre2_pattern(struct grep_pat *p) +static void free_pcre2_pattern(struct grep_pat *p UNUSED) { } |