[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 09/23] CODING_STYLE: Section about mixed declaratio
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 09/23] CODING_STYLE: Section about mixed declarations |
Date: |
Thu, 27 Mar 2014 19:28:14 +0400 |
From: Eduardo Habkost <address@hidden>
We had an unwritten rule about declarations having to be at beginning of
blocks. Make it a written rule.
Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Stefan Weil <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
CODING_STYLE | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CODING_STYLE b/CODING_STYLE
index dcbce28..4280945 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.
--
1.7.10.4
- [Qemu-trivial] [PULL 12/23] hw/pci/pci_host.c: Avoid shifting left into sign bit, (continued)
- [Qemu-trivial] [PULL 12/23] hw/pci/pci_host.c: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 20/23] hw/intc/xilinx_intc: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 13/23] hw/i386/acpi_build.c: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 21/23] hw/pci-host/apb.c: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 10/23] target-i386: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 22/23] hw/timer/grlib_gptimer: remove unnecessary assignment, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 14/23] target-mips: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 01/23] target-s390x: Add missing 'static' and 'const' attributes, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 17/23] hw/ppc: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 16/23] hw/intc/openpic: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 09/23] CODING_STYLE: Section about mixed declarations,
Michael Tokarev <=
- [Qemu-trivial] [PULL 15/23] hw/usb/hcd-ohci.c: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 18/23] tests/libqos/pci-pc: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 02/23] target-arm: Add missing 'static' attribute, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 04/23] util: Add 'static' attribute to function implementation, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 11/23] hw/intc/apic.c: Use uint32_t for mask word in foreach_apic, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 19/23] hw/intc/slavio_intctl: Avoid shifting left into sign bit, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 03/23] hw/ide: Add missing 'static' attributes, Michael Tokarev, 2014/03/27
- [Qemu-trivial] [PULL 08/23] doc: update default PowerPC framebuffer settings, Michael Tokarev, 2014/03/27
- Re: [Qemu-trivial] [Qemu-devel] [PULL for-2.0 00/23] Trivial patches for 2014-03-27, Peter Maydell, 2014/03/27