From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web09.7881.1644484690943429747 for ; Thu, 10 Feb 2022 01:18:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ItTka8VZ; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EB3F461968 for ; Thu, 10 Feb 2022 09:18:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0313C340F1 for ; Thu, 10 Feb 2022 09:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644484688; bh=4LnBYMHn9iCnY4P4U6hlDInigvFuzzRq3yvIXT2xgKg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ItTka8VZIQs9yPm39S9A3yEUKMm7l0ccfCIy59UAvBnZ5oy12svhJJ2YI4YmzaWI6 2n5i9eqrkSCJkg/UcWqysPiBW4sC0CQBKTkiI/8FzjNtPsh0QjXtCZsGyW040dKJiC N/3ksELeMRlJ91VM9pAQOrf8yJ7Jk60fdMsIJiSqfh/s1LB4SKEJktWvyM0WrMAf9e p+V7jkdv5+FKxWVfXAmnYeW6BLV6WjcZj6PgVLHDQkJy6/00EiT4DhVoqoAKSO186/ 8g1rDxsUrutAcTiNIyjyoZVNIPKYzqeFRX7qQQl8+zxlHNbEaQoi72QfwkkSubhUYo 2lZoIEa9PGcCg== Received: by mail-wr1-f53.google.com with SMTP id d27so4551679wrb.5 for ; Thu, 10 Feb 2022 01:18:08 -0800 (PST) X-Gm-Message-State: AOAM530bzZm6dUXdEN9bEg9G6TN4YtozejYGXnt60bEcuj5vC2olNpGv h8KhFMyA2WBzYCelKrGmJxP9/EIGAzYqpNSLnD8= X-Google-Smtp-Source: ABdhPJymLqyPDQxekgGqmfHAAFsJY2QhQW0YJPzirggEPR7IYv13kvNIShfXrxe/ciD5juqY6dSd7N+YSsg4ph3+l3s= X-Received: by 2002:a05:6000:1aca:: with SMTP id i10mr4543871wry.550.1644484687128; Thu, 10 Feb 2022 01:18:07 -0800 (PST) MIME-Version: 1.0 References: <20220204201302.21451-1-quic_rcran@quicinc.com> In-Reply-To: From: "Ard Biesheuvel" Date: Thu, 10 Feb 2022 10:17:55 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning with XCODE5 To: edk2-devel-groups-io , Rebecca Cran , "Liming Gao (Byosoft address)" Cc: James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth , Gerd Hoffmann , Brijesh Singh Content-Type: text/plain; charset="UTF-8" On Thu, 10 Feb 2022 at 10:17, Ard Biesheuvel wrote: > > (+ Liming) > ... for real this time. > On Fri, 4 Feb 2022 at 21:28, Rebecca Cran wrote: > > > > XCODE5 reported the following warning: > > > > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: > > uninitialized use occurs here > > Compacted > > ^^^^^^^^^ > > > > Initialize the 'Compacted' variable to fix the warning. > > > > Signed-off-by: Rebecca Cran > > --- > > 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..ccb1300690fa 100644 > > --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c > > +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c > > @@ -1872,6 +1872,7 @@ GetCpuidFw ( > > UINT32 XSaveSize; > > > > XssMsr.Uint64 = 0; > > + Compacted = 0; > > This should be FALSE not 0. I will fix this up before merging. > > Liming: is it ok if I merge this today? > > > > if (EcxIn == 1) { > > /* > > * The PPR and APM aren't clear on what size should be encoded in > > -- > > 2.34.1 > > > > > > > > > > > >