From 9e11175cf826946051d348eba717bdf20d094f37 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 28 Feb 2019 09:15:46 -0600 Subject: [PATCH] doc: update coding style To add forward-declaration of statics rule. This rule is already enforced, but for some reason the document in iwd did not have this rule in it (it is in other projects, like oFono) --- doc/coding-style.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/coding-style.txt b/doc/coding-style.txt index 8d3528f6..60e5d13f 100644 --- a/doc/coding-style.txt +++ b/doc/coding-style.txt @@ -310,6 +310,14 @@ Example: 0x1 << y // Wrong +M17: Avoid forward-declaration of static functions +================================================== + +Functions that are static should not be forward-declared. The only exception +to this rule is if a circular dependency condition exists, and the forward +declaration cannot be avoided. + + O1: Shorten the name ==================== Better to use abbreviation, rather than full name, to name a variable,