diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-09-06 10:38:50 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-06 10:38:50 -0700 |
| commit | 4476304a06e6dad284e0d75245cd32f01a01a8c7 (patch) | |
| tree | ca1eed236df5eaef10c2a41eacfd7be10e178da1 /Documentation/CodingGuidelines | |
| parent | 5ecd5fa58b3315d6bdd6ef9218c7ae442782bc5d (diff) | |
| parent | a051ca5e650138230f3dd61bda911f0f409ebf23 (diff) | |
| download | git-4476304a06e6dad284e0d75245cd32f01a01a8c7.tar.gz | |
Merge branch 'jc/maybe-unused'
Developer doc updates.
* jc/maybe-unused:
CodingGuidelines: also mention MAYBE_UNUSED
Diffstat (limited to 'Documentation/CodingGuidelines')
| -rw-r--r-- | Documentation/CodingGuidelines | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index d0fc7cfe60..3263245b03 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -262,8 +262,9 @@ For C programs: like "error: unused parameter 'foo' [-Werror=unused-parameter]", which indicates that a function ignores its argument. If the unused parameter can't be removed (e.g., because the function is used as a - callback and has to match a certain interface), you can annotate the - individual parameters with the UNUSED keyword, like "int foo UNUSED". + callback and has to match a certain interface), you can annotate + the individual parameters with the UNUSED (or MAYBE_UNUSED) + keyword, like "int foo UNUSED". - We try to support a wide range of C compilers to compile Git with, including old ones. As of Git v2.35.0 Git requires C99 (we check |
