You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/08/01 21:07:38 UTC
[2/2] incubator-mynewt-core git commit: coding standards - variable
defn. placement.
coding standards - variable defn. placement.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/403e8992
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/403e8992
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/403e8992
Branch: refs/heads/develop
Commit: 403e8992278f77ef0096bd1d4b74eb91f8f49352
Parents: b005e15
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Aug 1 14:06:59 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Aug 1 14:06:59 2016 -0700
----------------------------------------------------------------------
CODING_STANDARDS.md | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/403e8992/CODING_STANDARDS.md
----------------------------------------------------------------------
diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md
index 4727f1e..fc8523d 100644
--- a/CODING_STANDARDS.md
+++ b/CODING_STANDARDS.md
@@ -254,6 +254,8 @@ applications to use pointers to those structures opaquely.
hide or alias the underlying type used (e.g. ```os_time_t```.) Indicate
typedefs by applying the ```_t``` marker to them.
+* Place all function-local variable definitions at the top of the function body, before any statements.
+
## Compiler Directives
* Code must compile cleanly with -Wall enabled.