From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 20D6C226516AC for ; Sat, 7 Apr 2018 18:48:45 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2018 18:48:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,421,1517904000"; d="scan'208";a="41537308" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 07 Apr 2018 18:48:45 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 7 Apr 2018 18:48:44 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.184]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.197]) with mapi id 14.03.0319.002; Sun, 8 Apr 2018 09:48:43 +0800 From: "Bi, Dandan" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Yao, Jiewen" , "Kinney, Michael D" Thread-Topic: [PATCH] MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer warnings Thread-Index: AQHTztj+xMWsS7VGCUGBBRRxNfDIs6P2GZTQ Date: Sun, 8 Apr 2018 01:48:41 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3BA9A7FA@shsmsx102.ccr.corp.intel.com> References: <1523150937-97020-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1523150937-97020-1-git-send-email-star.zeng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer warnings X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Apr 2018 01:48:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan -----Original Message----- From: Zeng, Star=20 Sent: Sunday, April 8, 2018 9:29 AM To: edk2-devel@lists.01.org Cc: Zeng, Star ; Bi, Dandan ; Yao= , Jiewen ; Kinney, Michael D Subject: [PATCH] MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer war= nings It is caused by 0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c and false positive. Initialize CpuArchAttributes to suppress incorrect compiler/analyzer warnin= gs. Cc: Dandan Bi Cc: Jiewen Yao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gc= d.c index 31ddf9c3bb51..e17e98230b79 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -3,7 +3,7 @@ The GCD services are used to manage the memory and I/O regions that are accessible to the CPU that is executing the DXE core. =20 -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availab= le under the terms and conditions of the BSD License which accompanies thi= s distribution. The full text of the license may be found at @@ -866,6 +86= 6,10 @@ CoreConvertSpace ( } ASSERT (TopEntry !=3D NULL && BottomEntry !=3D NULL); =20 + // + // Initialize CpuArchAttributes to suppress incorrect compiler/analyzer = warnings. + // + CpuArchAttributes =3D 0; if (Operation =3D=3D GCD_SET_ATTRIBUTES_MEMORY_OPERATION) { // // Call CPU Arch Protocol to attempt to set attributes on the range -- 2.7.0.windows.1