From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web08.3852.1643092545833111567 for ; Mon, 24 Jan 2022 22:35:48 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=VvFkcLWi; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643092547; x=1674628547; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=u7ZjK35JU50RIy8pBTQ+hVcgVaHTpClqk6y1ZevG/Ko=; b=VvFkcLWi/rt/hkRilyGFKgbG2fLSDXVL9zBQFcoOqiFr8KTa8mbombna WeHRgTKrQN9Qu6HNHUXWt8tIYH6iVT+B6BLuEtdUK21wOUY7kRTArR4pp MOJtcZ98j2cE0WU3pHIkKXtf5an1zUbq6Gk7DvO8CdjAjwpBKJHYnd1Gf 7IccL5bub/dbLu4V1r49TWibTpczo4kzMVqsUV6VJlMt2KUSAsRGYCiz4 stBoj66E+hJXVpySkOxcmIF/W+MvdFWNMKerisYQhB+UXSuTo7mZRIT1b eXuOvN6Ar7WIH2dz9KxMiVJnOhDf4NjTz+V+fHz8ng5KGEV6b41CQBcJU g==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="226904815" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="226904815" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2022 22:35:34 -0800 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="534592630" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.238.0.72]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2022 22:35:32 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Leif Lindholm , Ard Biesheuvel , Abner Chang , Daniel Schaefer Subject: [PATCH V2 01/10] EmbeddedPkg: Fix a build error in FwVol.c in X64 arch Date: Tue, 25 Jan 2022 14:33:09 +0800 Message-Id: <20220125063318.862-2-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20220125063318.862-1-min.m.xu@intel.com> References: <20220125063318.862-1-min.m.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 CompressedDataLength is declared as UINTN which is UINT64 in X64 arch. But the second parameter of UefiDecompressGetInfo() is declared as UINT32. So a build error is triggered. To declare CompressedDataLength as UINT32 to fix the build error. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Abner Chang Cc: Daniel Schaefer Signed-off-by: Min Xu --- EmbeddedPkg/Library/PrePiLib/FwVol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c b/EmbeddedPkg/Library/PrePiLib/FwVol.c index 92ae68f0d382..0a6d6925b7ea 100644 --- a/EmbeddedPkg/Library/PrePiLib/FwVol.c +++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c @@ -291,7 +291,7 @@ FfsProcessSection ( UINT16 SectionAttribute; UINT32 AuthenticationStatus; CHAR8 *CompressedData; - UINTN CompressedDataLength; + UINT32 CompressedDataLength; *OutputBuffer = NULL; ParsedLength = 0; @@ -320,7 +320,7 @@ FfsProcessSection ( } CompressedData = (CHAR8 *)((EFI_COMPRESSION_SECTION2 *)Section + 1); - CompressedDataLength = (UINT32)SectionLength - sizeof (EFI_COMPRESSION_SECTION2); + CompressedDataLength = SectionLength - sizeof (EFI_COMPRESSION_SECTION2); } else { CompressionSection = (EFI_COMPRESSION_SECTION *)Section; SectionLength = SECTION_SIZE (Section); @@ -330,7 +330,7 @@ FfsProcessSection ( } CompressedData = (CHAR8 *)((EFI_COMPRESSION_SECTION *)Section + 1); - CompressedDataLength = (UINT32)SectionLength - sizeof (EFI_COMPRESSION_SECTION); + CompressedDataLength = SectionLength - sizeof (EFI_COMPRESSION_SECTION); } Status = UefiDecompressGetInfo ( -- 2.29.2.windows.2