Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9D03B200B66 for ; Wed, 3 Aug 2016 23:58:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9BBC1160A86; Wed, 3 Aug 2016 21:58:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E2375160AB0 for ; Wed, 3 Aug 2016 23:58:07 +0200 (CEST) Received: (qmail 93618 invoked by uid 500); 3 Aug 2016 21:58:07 -0000 Mailing-List: contact commits-help@mynewt.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mynewt.incubator.apache.org Delivered-To: mailing list commits@mynewt.incubator.apache.org Received: (qmail 93609 invoked by uid 99); 3 Aug 2016 21:58:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2016 21:58:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B72DBCB86B for ; Wed, 3 Aug 2016 21:58:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.465 X-Spam-Level: X-Spam-Status: No, score=-4.465 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.245] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id DsAN7-EE6fSE for ; Wed, 3 Aug 2016 21:58:05 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id 4DDD960E5B for ; Wed, 3 Aug 2016 21:58:03 +0000 (UTC) Received: (qmail 92957 invoked by uid 99); 3 Aug 2016 21:58:02 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2016 21:58:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 29721EEE1B; Wed, 3 Aug 2016 21:58:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sterling@apache.org To: commits@mynewt.incubator.apache.org Date: Wed, 03 Aug 2016 21:58:13 -0000 Message-Id: <5b6b204f9260454e87c71b94e0456442@git.apache.org> In-Reply-To: <26d12bf1c8e4478b9fe99384eff8a7fe@git.apache.org> References: <26d12bf1c8e4478b9fe99384eff8a7fe@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [13/13] incubator-mynewt-core git commit: coding standards - variable defn. placement. archived-at: Wed, 03 Aug 2016 21:58:08 -0000 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/3ceb8ae1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/3ceb8ae1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/3ceb8ae1 Branch: refs/heads/sterly_refactor Commit: 3ceb8ae172ce67204e93830c02e92d4631509eb1 Parents: ce2e596 Author: Christopher Collins Authored: Mon Aug 1 14:06:59 2016 -0700 Committer: Sterling Hughes Committed: Wed Aug 3 14:57:50 2016 -0700 ---------------------------------------------------------------------- CODING_STANDARDS.md | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3ceb8ae1/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.