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.20; helo=mga02.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 4E8E92098C8C9 for ; Thu, 19 Jul 2018 08:27:24 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2018 08:27:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,375,1526367600"; d="scan'208";a="76125451" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 19 Jul 2018 08:27:23 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 19 Jul 2018 08:27:23 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 19 Jul 2018 08:27:23 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.81]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.100]) with mapi id 14.03.0319.002; Thu, 19 Jul 2018 23:27:21 +0800 From: "Gao, Liming" To: Anthony PERARD , "edk2-devel@lists.01.org" CC: Laszlo Ersek , "Dong, Eric" Thread-Topic: [edk2] [PATCH] UefiCpuPkg/MpInitLib: Fix build of Microcode Thread-Index: AQHUH3D8t8kxm082Tk+poxktZGEhw6SWqdBQ Date: Thu, 19 Jul 2018 15:27:20 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2BDD0B@SHSMSX104.ccr.corp.intel.com> References: <20180719145825.13339-1-anthony.perard@citrix.com> In-Reply-To: <20180719145825.13339-1-anthony.perard@citrix.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjc0Mzg4NTYtZjExOC00ZmU1LWIyOTMtYWI5MTllMDRjYTEwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUUFnUGlJRHR2R1lCdURkeWdYb0g5NVNGdWJsdlBvZ3o0OFlYSmNIUGhWUkRZck10WFRhTXhvUjhxOWx1dnZDZiJ9 dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] UefiCpuPkg/MpInitLib: Fix build of Microcode X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 15:27:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Edk2 style doesn't initialize the local variable value in its declaration. = Could you update this patch to separately set ProcessorFlags value? Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of An= thony PERARD > Sent: Thursday, July 19, 2018 10:58 PM > To: edk2-devel@lists.01.org > Cc: Anthony PERARD ; Laszlo Ersek ; Dong, Eric > Subject: [edk2] [PATCH] UefiCpuPkg/MpInitLib: Fix build of Microcode >=20 > On Debian Jessie, this fail to build with: >=20 > /build/UefiCpuPkg/Library/MpInitLib/Microcode.c: In function 'MicrocodeDe= tect': > /build/UefiCpuPkg/Library/MpInitLib/Microcode.c:248:37: error: 'Processor= Flags' may be used uninitialized in this function > [-Werror=3Dmaybe-uninitialized] > CpuMpData->ProcessorFlags =3D ProcessorFlags; > ^ >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Anthony PERARD > --- > UefiCpuPkg/Library/MpInitLib/Microcode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Librar= y/MpInitLib/Microcode.c > index efda143e67..60cf8bf409 100644 > --- a/UefiCpuPkg/Library/MpInitLib/Microcode.c > +++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c > @@ -60,7 +60,7 @@ MicrocodeDetect ( > BOOLEAN CorrectMicrocode; > VOID *MicrocodeData; > MSR_IA32_PLATFORM_ID_REGISTER PlatformIdMsr; > - UINT32 ProcessorFlags; > + UINT32 ProcessorFlags =3D 0; > UINT32 ThreadId; >=20 > if (CpuMpData->MicrocodePatchRegionSize =3D=3D 0) { > -- > Anthony PERARD >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel