From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by mx.groups.io with SMTP id smtpd.web08.1449.1643835272667963097 for ; Wed, 02 Feb 2022 12:54:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=Q7KJFETf; spf=pass (domain: quicinc.com, ip: 199.106.114.38, mailfrom: quic_rcran@quicinc.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1643835272; x=1675371272; h=message-id:date:mime-version:to:from:subject; bh=sqDX/BsJgVXvHe2WI/jzJnY8u7XSROhSV+z1C7ezJOc=; b=Q7KJFETfXXvwEDPHmGUdtMvhjd01h34KefNlkU2Buxu48TI9ZBgaBuyE y771hj5frdyBT10DsylzGhKNsvYUcJnegFV95fO/0EYeas1NXaJojCi+u 1zgvb8dGL7ctqJ+HSJKx7+jrTQ06K3jB4/ydJrJcyx2c8QSZ9xYFkI8Tn E=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 02 Feb 2022 12:54:32 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2022 12:54:31 -0800 Received: from [10.110.3.55] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Wed, 2 Feb 2022 12:54:31 -0800 Message-ID: Date: Wed, 2 Feb 2022 13:54:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 To: Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Min Xu , Tom Lendacky , edk2-devel-groups-io From: "Rebecca Cran" Subject: OvmfPkg VmgExitLib fails to build with CLANG38 (clang 13.0.0) Return-Path: quic_rcran@quicinc.com X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.47.97.222) Content-Type: multipart/alternative; boundary="------------T0otkc6ayA0MM9wIEqAVL60v" Content-Language: en-US --------------T0otkc6ayA0MM9wIEqAVL60v Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit VmgExitLib fails to build with the CLANG38 toolset (clang 13.0.0): edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1875:9: error: variable 'Compacted' is used uninitialized whenever 'if' condition is false [-Werror,-W sometimes-uninitialized]    if (EcxIn == 1) {        ^~~~~~~~~~ edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized use occurs here           Compacted           ^~~~~~~~~ edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1875:5: note: remove the 'if' if its condition is always true    if (EcxIn == 1) {    ^~~~~~~~~~~~~~~~ edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1871:37: note: initialize the variable 'Compacted' to silence this warning    BOOLEAN                Compacted;                                    ^                                     = '\0' -- Rebecca Cran --------------T0otkc6ayA0MM9wIEqAVL60v Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit
VmgExitLib fails to build with the CLANG38 toolset (clang 13.0.0):


edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1875:9: error: variable 'Compacted' is used uninitialized whenever 'if' condition is false [-Werror,-W
sometimes-uninitialized]
   if (EcxIn == 1) {
       ^~~~~~~~~~
edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized use occurs here
          Compacted
          ^~~~~~~~~
edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1875:5: note: remove the 'if' if its condition is always true
   if (EcxIn == 1) {
   ^~~~~~~~~~~~~~~~
edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1871:37: note: initialize the variable 'Compacted' to silence this warning
   BOOLEAN                Compacted;
                                   ^
                                    = '\0'

--
Rebecca Cran

--------------T0otkc6ayA0MM9wIEqAVL60v--