]> git.ipfire.org Git - thirdparty/git.git/commit
CodingGuidelines: also mention MAYBE_UNUSED
authorJunio C Hamano <gitster@pobox.com>
Thu, 29 Aug 2024 18:18:06 +0000 (11:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Aug 2024 18:28:07 +0000 (11:28 -0700)
commita051ca5e650138230f3dd61bda911f0f409ebf23
tree90bfdbea3903e817c2c92879ba1a7fa32ca595e9
parentc3b92d40377f350c5feb0408572978390016fc61
CodingGuidelines: also mention MAYBE_UNUSED

A function that uses a parameter in one build may lose all uses of
the parameter in another build, depending on the configuration.  A
workaround for such a case, MAYBE_UNUSED, should also be mentioned
when we recommend the use of UNUSED to our developers.

Keep the addition to the guideline short and document the criteria
to choose between UNUSED and MAYBE_UNUSED near their definition.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/CodingGuidelines
git-compat-util.h