diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2014-03-17 15:26:31 -0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-03-27 19:22:49 +0400 |
commit | e939c6ed619e2cf98c379318f6ee389c97163f18 (patch) | |
tree | c4e8a180d4aa67f38e838e6c4ccb269d9f0ec5d6 /CODING_STYLE | |
parent | 340fb41b311356d66b280468698b1f2d7b0c1a56 (diff) |
CODING_STYLE: Section about mixed declarations
We had an unwritten rule about declarations having to be at beginning of
blocks. Make it a written rule.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'CODING_STYLE')
-rw-r--r-- | CODING_STYLE | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CODING_STYLE b/CODING_STYLE index dcbce28a27..4280945ff0 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -84,3 +84,10 @@ and clarity it comes on a line by itself: Rationale: a consistent (except for functions...) bracing style reduces ambiguity and avoids needless churn when lines are added or removed. Furthermore, it is the QEMU coding style. + +5. Declarations + +Mixed declarations (interleaving statements and declarations within blocks) +are not allowed; declarations should be at the beginning of blocks. In other +words, the code should not generate warnings if using GCC's +-Wdeclaration-after-statement option. |