[PATCH V2] edk II C Coding Standard: Remove section 22.214.171.124 STATIC
From: Abner Chang <abner.chang@...>
Revise the sections that mention the usage of "static" and
remove section 126.96.36.199.1 and 188.8.131.52.2 section.
We are not allowed to use upper-case STATIC in the source
Just follow C standard and use the lower-case 'static'.
Leave the macro "#deifne STATIC static" there without
removing it to keep the backward compatible.
Signed-off-by: Abner Chang <abner.chang@...>
Cc: Ray Ni <ray.ni@...>
Cc: Michael D Kinney <michael.d.kinney@...>
5_source_files/54_code_file_structure.md | 19 ++++---------------
5_source_files/56_declarations_and_types.md | 2 +-
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/5_source_files/54_code_file_structure.md b/5_source_files/54_code_file_structure.md
index 0c4d6a2..6a9fcc7 100644
@@ -267,19 +267,8 @@ specified in Section 184.108.40.206 "Compile-Time Names".
Thus, while it might be legal C, do **not** declare external variables anywhere
other than at the top level of a file as specified by this document.
-#### 220.127.116.11 Static
+#### 18.104.22.168 static
-An object declared `STATIC` has either file or block scope.
-##### 22.214.171.124.1 Do not reuse an object or function identifier with static storage duration.
-Throughout the set of source files defined within a single .inf file, do not
-reuse an identifier with static storage duration. The compiler may not be
-confused by this, but the user may confuse unrelated variables with the same
-##### 126.96.36.199.2 Functions should not be declared STATIC.
-Some source-level debuggers are unable to resolve static functions. Until it
-can be verified that no one is dependent upon a debugger with this limitation,
-it is strongly recommended that functions not be declared static.
+Use static for the variables and functions those are non-public to other source
+files is encouraged. This reduces the chances of symbol redefined error during
\ No newline at end of file
diff --git a/5_source_files/56_declarations_and_types.md b/5_source_files/56_declarations_and_types.md
index ec1803d..db98b95 100644
@@ -38,7 +38,7 @@
Any abstract type that is defined must be constructed from other abstract types
or from common EFI data types.
-#### 188.8.131.52 The use of int, unsigned, char, void, static, long is a violation of the coding convention.
+#### 184.108.40.206 The use of int, unsigned, char, void, long and the data types those are defined in EFI Data Types is a violation of the coding convention.
The corresponding EFI types must be used instead.