From nobody Tue Feb 10 01:16:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68982+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68982+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1608138506; cv=none; d=zohomail.com; s=zohoarc; b=BTUoct/Qs12eqAS3ELVoLpQIF6+qqDv6JYODWQ9squi8X7HxJFKblIHXCZcQJnwQ4ZnyxWRAkklx9VUgw3q46ttHWBOzX6Cdkx1YAKM+Q2TBQOxQOKEnirND7Fiku2MQuYdvVP//kArix1GzAStmr1c9yWdCWqLSAxUeceRkSHM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608138506; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=UvyJ1fOBRLKiIRm9+BJV2GuWv3GOcteE1ZFwdNWF/s0=; b=lji4zRtPNrAHRc88uulawClI6pB/ONIiggSVxTIoIWAL6/FWIcqNeiSic4dxOJiUgo3n9ZAkvolBGBpQb2r/X0yjeQdHIS/JN9M0sQgJEikQgDEq1tp/Xh9SpZa8EoFWRNkfFZOldYn0EtxNrDA8WSL8VPbGA0E8uzlzW44MshE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68982+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608138506751400.6151602827323; Wed, 16 Dec 2020 09:08:26 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id HhfdYY1788612xYTrP4NUGlA; Wed, 16 Dec 2020 09:08:24 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.11478.1608138323851420699 for ; Wed, 16 Dec 2020 09:05:23 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 768E01042; Wed, 16 Dec 2020 09:05:23 -0800 (PST) X-Received: from e120189.arm.com (unknown [10.57.25.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 08CE03F66E; Wed, 16 Dec 2020 09:05:21 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io, bob.c.feng@intel.com, gaoliming@byosoft.com.cn, yuwei.chen@intel.com Cc: sami.mujawar@arm.com Subject: [edk2-devel] [PATCH v1 2/2] BaseTools/Ecc: Allow init of function static variables Date: Wed, 16 Dec 2020 17:05:06 +0000 Message-Id: <20201216170506.13313-3-Pierre.Gondois@arm.com> In-Reply-To: <20201216170506.13313-1-Pierre.Gondois@arm.com> References: <20201216170506.13313-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: uPSpjcbM9NAbAyYz287htWnvx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608138504; bh=KbLVXRoqhRa3zq+vYygtnFAevDMMUWVkyD64UcjHVLQ=; h=Cc:Date:From:Reply-To:Subject:To; b=H9u6vNROjYmTiYSkaomr1M5smXjlqLg94lNTM+Cgm7yMYnznakHmvQsOPgbkBefiw2o ZogORRtbcBt9PbswEhVcREFQZr0iuidfvsDDiBuLGD6uaF29me8fjmU06leCD6rOaYB+H cqZfg5rSnw3Oiylog3y+iM4DgZwoLWqtujU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois 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 --- 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_VAR= IABLE, 'Variable Name: %s' % Result[0], FileTable, Result[2]) def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId): -- 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68982): https://edk2.groups.io/g/devel/message/68982 Mute This Topic: https://groups.io/mt/79005708/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-