diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-04-04 10:56:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-04 10:56:24 -0700 |
commit | 77ceb113420ce73c35bdea47cb320b08ed1ab0e9 (patch) | |
tree | 817e6e6261445cd5fdf6dd2af6cc2c8d93235703 | |
parent | Merge branch 'vd/mv-refresh-stat' (diff) | |
parent | CodingGuidelines: give deadline for "for (int i = 0; ..." (diff) | |
download | tgif-77ceb113420ce73c35bdea47cb320b08ed1ab0e9.tar.xz |
Merge branch 'jc/coding-guidelines-decl-in-for-loop'
Coding Guidelines clarification.
* jc/coding-guidelines-decl-in-for-loop:
CodingGuidelines: give deadline for "for (int i = 0; ..."
-rw-r--r-- | Documentation/CodingGuidelines | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 1a7bc4591c..b20b2f94f1 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -227,7 +227,10 @@ For C programs: the first statement (i.e. -Wdeclaration-after-statement). - Declaring a variable in the for loop "for (int i = 0; i < 10; i++)" - is still not allowed in this codebase. + is still not allowed in this codebase. We are in the process of + allowing it by waiting to see that 44ba10d6 (revision: use C99 + declaration of variable in for() loop, 2021-11-14) does not get + complaints. Let's revisit this around November 2022. - NULL pointers shall be written as NULL, not as 0. |