From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by mx.groups.io with SMTP id smtpd.web11.17659.1639431965310640374 for ; Mon, 13 Dec 2021 13:46:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=fm1 header.b=CQKJDDGA; spf=pass (domain: bsdio.com, ip: 66.111.4.224, mailfrom: rebecca@bsdio.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 2EDCC580179; Mon, 13 Dec 2021 16:46:04 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 13 Dec 2021 16:46:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=L EiGDiDG94nIF0kXJJfm+o0yiGDOzHh6IjfWhgiEZgQ=; b=CQKJDDGAbypcpy0mo 00Dqy4Uq0T3JIpmQbYH6dYP1NXzFRtHaVSQHk6svaa9tv69XGNggJH8c3Wl5ZPKN 2389JIXDbDCHhYk89je6aUQgVi4oHOITPtvm+EIPp23wQJ4if0ZVm40zgML1xRE3 W+sfwdnVwdXCyTabQckcvSvwggl2SK671W/T2l0r+LTfDPaaIXLcdeB1ckhY+eF2 VNDp9YiBZ65C5ly5wTU3wBnvAiaPod0UXlDShgSGbuqyz6H3cMSSmnKNZT32P5wu y56r+Ah+2yPm3M3l5Tj9BBnTM8a2Zj2Lt290aRaZvwdJCorOeOBq8yF/QDkMF5BI u/2pA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=LEiGDiDG94nIF0kXJJfm+o0yiGDOzHh6IjfWhgiEZ gQ=; b=fBWW3pEZ+TDl1vlq3kL0s6r7H2wZ+nl4W0sGfEOCDFjR0ab3eyc1YwxcR kDnOhWYD08Nml1unnfqQNyvKeFNzIS8c0RjwhrwrLUelz5v+luVl/CCpnwZHuGTR 5IMhSWo0rDqYXxrll4tywuXKG1N7ztLu2QpzEvrtd8Sii43coIbLpmHz9xvirBii R5to1dbvJyZqnTgHS1kJ85kQizKroLSg2Nns0ad0N7BcH5PnmEfowbgjE4OjcEcH Nt/jWjwAXW+1TcCBWJKihNJGlHX5zz0R7KUJPqcqLkkEiLM4ly4Giju33WVjLJ4y SWi/mCbK4Z7CCXNWv5nChjxNX/XzQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrkeekgdduheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepleduvedtledtvedvuedugeeuudeiiedtueduvdffueekfeejffduvdetjeev ffdvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Dec 2021 16:46:02 -0500 (EST) Message-ID: <6d883580-620f-9fe3-766c-831cd23fcad0@bsdio.com> Date: Mon, 13 Dec 2021 14:46:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning To: devel@edk2.groups.io, brijesh.singh@amd.com Cc: James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth , Gerd Hoffmann References: <20211213193839.143953-1-brijesh.singh@amd.com> From: "Rebecca Cran" In-Reply-To: <20211213193839.143953-1-brijesh.singh@amd.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reviewed-by: Rebecca Cran -- Rebecca Cran On 12/13/21 12:38, Brijesh Singh via groups.io wrote: > The XCODE5 reported the below warning > > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized use occurs here > Compacted > ^^^^^^^^^ > > Initialize the 'Compacted' variable to fix the warning. > > Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID values) > Cc: James Bottomley > Cc: Min Xu > Cc: Jiewen Yao > Cc: Tom Lendacky > Cc: Jordan Justen > Cc: Ard Biesheuvel > Cc: Erdem Aktas > Cc: Gerd Hoffmann > Cc: Rebecca Cran > Cc: Michael Roth > Signed-off-by: Brijesh Singh > --- > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c > index a40a31f7c275..ff367411cc59 100644 > --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c > +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c > @@ -1872,6 +1872,7 @@ GetCpuidFw ( > UINT32 XSaveSize; > > XssMsr.Uint64 = 0; > + Compacted = FALSE; > if (EcxIn == 1) { > /* > * The PPR and APM aren't clear on what size should be encoded in