From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io, bob.c.feng@intel.com,
gaoliming@byosoft.com.cn, yuwei.chen@intel.com
Cc: sami.mujawar@arm.com
Subject: [PATCH v1 2/2] BaseTools/Ecc: Allow init of function static variables
Date: Wed, 16 Dec 2020 17:05:06 +0000 [thread overview]
Message-ID: <20201216170506.13313-3-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20201216170506.13313-1-Pierre.Gondois@arm.com>
From: Pierre Gondois <Pierre.Gondois@arm.com>
The Ecc tool currently reports the initialization of variables
at declaraton if the variable is non-constant and declared
in a function. Static variables locally defined in functions
should also be allowed to be initialized at declaration.
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
---
The changes can be seen at: https://github.com/PierreARM/edk2/commits/1551_Ecc_BaseTools_v1
BaseTools/Source/Python/Ecc/c.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py
index db686df0db25..4a82e5e76003 100644
--- a/BaseTools/Source/Python/Ecc/c.py
+++ b/BaseTools/Source/Python/Ecc/c.py
@@ -1560,7 +1560,7 @@ def CheckFuncLayoutLocalVariable(FullFileName):
continue
for Result in ResultSet:
- if len(Result[1]) > 0 and 'CONST' not in Result[3]:
+ if len(Result[1]) > 0 and 'CONST' not in Result[3] and 'STATIC' not in Result[3]:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE, 'Variable Name: %s' % Result[0], FileTable, Result[2])
def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId):
--
2.17.1
next prev parent reply other threads:[~2020-12-16 17:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 17:05 [PATCH v1 0/2] Ecc tool modifications PierreGondois
2020-12-16 17:05 ` [PATCH v1 1/2] BaseTools: Fix crash in ECC when parsing incorrect header PierreGondois
2020-12-16 17:05 ` PierreGondois [this message]
2020-12-17 0:53 ` 回复: [PATCH v1 0/2] Ecc tool modifications gaoliming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201216170506.13313-3-Pierre.Gondois@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox