From nobody Sun Apr 28 23:23:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1523150950046412.7261876171433; Sat, 7 Apr 2018 18:29:10 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1EE38225501CD; Sat, 7 Apr 2018 18:29:06 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 8F49C226516DE for ; Sat, 7 Apr 2018 18:29:04 -0700 (PDT) Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2018 18:29:03 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by orsmga008.jf.intel.com with ESMTP; 07 Apr 2018 18:29:02 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,421,1517904000"; d="scan'208";a="31883164" From: Star Zeng To: edk2-devel@lists.01.org Date: Sun, 8 Apr 2018 09:28:57 +0800 Message-Id: <1523150937-97020-1-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [edk2] [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: , Cc: Michael D Kinney , Dandan Bi , Jiewen Yao , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It is caused by 0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c and false positive. Initialize CpuArchAttributes to suppress incorrect compiler/analyzer warnings. Cc: Dandan Bi Cc: Jiewen Yao Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Dandan Bi --- 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 available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at @@ -866,6 +866,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 --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel