From nobody Wed May 8 21:47:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43836+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43836+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1563333798; cv=none; d=zoho.com; s=zohoarc; b=Vuy25/lbaRtkTzYL4e2OSZxg4o3r7h1nUn1z0cgcWBnhpu1rRjlf65JyLh97KLDMsuoxHwL1Jb0C/qHEIHH+Ir/Kp8KPjaedMM5Izmx9WM3OiALGX/FT5/VhlnhefN9t11nrfkxKkKkRAesoe5h4lxikI/CckplVN9BiCQsB5DI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563333798; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=MiBKRI+B1/T8roOJvith/xKv5bUVUWXNryg9cflBrJk=; b=EcEx2zGzSAcxJERUSVFwfPo8W6qxLXiLpX4mitSmT3b/LQt4lu6yYhCezeLLnSYF5RwjfkTNUcLvnQD644JbZ5cjYZ7Kl+edoeZgOjICEB0t0RatYhF7eYQUWEBByVtvnAyGKFdv6Mobo5sO0MCny8Dri7iiQ/5foGasFasGV8Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43836+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1563333798557597.7928882269539; Tue, 16 Jul 2019 20:23:18 -0700 (PDT) Return-Path: X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Tue, 16 Jul 2019 20:23:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2019 20:23:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,272,1559545200"; d="scan'208";a="169445936" X-Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.38]) by fmsmga007.fm.intel.com with ESMTP; 16 Jul 2019 20:23:15 -0700 From: "Zeng, Star" To: devel@edk2.groups.io Cc: Star Zeng , Laszlo Ersek , Eric Dong , Ray Ni , Dandan Bi Subject: [edk2-devel] [PATCH] UefiCpuPkg DxeRegisterCpuFeaturesLib: Fix VS2012 build failure Date: Wed, 17 Jul 2019 11:23:14 +0800 Message-Id: <20190717032314.25408-1-star.zeng@intel.com> MIME-Version: 1.0 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,star.zeng@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563333798; bh=2TcLBr9TEhA2TiPouRKrW1mla//k8oEMia/6liZYeKU=; h=Cc:Date:From:Reply-To:Subject:To; b=gK9xDIzrybTjw4l667uTO4JFAcUUmjkL9pjHT6Y8GG/PF7ynozkHAp7RyXyZ/MufaDB XZ+3ST+RCtN7kRqcXF2QULZ/WHrDHF1Q2VqfnvvPvxPpX9sGntPjo6vPoncmssV4JfRWj kqo4grhFNiQHVBDdCY5K+dKuMXFrjeI6QTs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The new VS2012 build failure is caused by 7a0df26. xxx\registercpufeatureslib\dxeregistercpufeatureslib.c(258) : warning C4701: potentially uninitialized local variable 'MpEvent' used It is a false positive alarm. MpEvent is assigned at line 238 and will be used at line 258, both lines are controlled by "if (CpuFeaturesData->NumberOfCpus > 1)". This patch initializes MpEvent to suppress incorrect compiler/analyzer warnings. Cc: Laszlo Ersek Cc: Eric Dong Cc: Ray Ni Cc: Dandan Bi Signed-off-by: Star Zeng Reviewed-by: Eric Dong --- .../RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeatur= esLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesL= ib.c index ffd99046a6cd..f87b2892aaae 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c @@ -229,6 +229,12 @@ CpuFeaturesInitialize ( OldBspNumber =3D GetProcessorIndex (CpuFeaturesData); CpuFeaturesData->BspNumber =3D OldBspNumber; =20 + // + // + // Initialize MpEvent to suppress incorrect compiler/analyzer warnings. + // + MpEvent =3D NULL; + if (CpuFeaturesData->NumberOfCpus > 1) { Status =3D gBS->CreateEvent ( EVT_NOTIFY_WAIT, --=20 2.21.0.windows.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 (#43836): https://edk2.groups.io/g/devel/message/43836 Mute This Topic: https://groups.io/mt/32499927/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-