]> git.ipfire.org Git - thirdparty/git.git/commit
grep: prefer UNUSED to MAYBE_UNUSED for pcre allocators
authorJeff King <peff@peff.net>
Thu, 29 Aug 2024 20:09:53 +0000 (16:09 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Aug 2024 20:59:46 +0000 (13:59 -0700)
commit516a9ec3d5874aad41757e573f7b841bb45cb098
treeb3555f8d275a7fc62443b75b56b88fb8ec045085
parent3cdddcf6b220cb6097b00ff7df1e4d0277ec43c4
grep: prefer UNUSED to MAYBE_UNUSED for pcre allocators

We provide custom malloc/free callbacks for the pcre library to use.
Those take an extra "data" parameter, but we don't use it. Back when
these were added in 513f2b0bbd (grep: make PCRE2 aware of custom
allocator, 2019-10-16), we only had MAYBE_UNUSED.

But these days we have UNUSED, which we should prefer, as it will
let the compiler inform us if the code changes to actually use the
parameters.

I also moved the annotations to come after the variable name, which is
how we typically spell it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c