From nobody Fri Apr 26 22:05:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+66253+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66253+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1602760845; cv=none; d=zohomail.com; s=zohoarc; b=mVXmLxL3XhgNoyA+2DWC/OUCaFTHaFajN4Dh/weFRZg0hQtMrHeDf7JCmuOcYlovxAU2XbBKPR4sICVd+zZgODJ9rZNMopjXOcw9VzRlRDdVZ9ZLWBDnbGsTS8vIJXea/imNl0G50HoUPRF+e9pFP8DmNy5L3nTNCLTNfjVm5/o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602760845; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=QYwA0+XwoKTYFGx4OpAixPwLUq8wGVR3ZKLdBz+JAxY=; b=Sw6WNHCo9jb+wszzO2N1pAMY6SJ3yMSY+ZqDPIXDRaCgu9H29U4f0/gVuf8fETes0YL6eujVTd67r325YgmwqmEKc/St/XaBQdmReLgtBWvCfTUwJ8YbfgtNFH/vYF0ZNMwlKkigvrGwfWVqBJ4D9OsCIrMh8QMW9CCxxYTxA/A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+66253+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16027608453071010.7983763910022; Thu, 15 Oct 2020 04:20:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id eAeuYY1788612xK9i1MqdMj9; Thu, 15 Oct 2020 04:20:44 -0700 X-Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web12.9826.1602760843570491031 for ; Thu, 15 Oct 2020 04:20:43 -0700 IronPort-SDR: P5x9bCZX0dVkfDUEWffYJ6nz2HdRfqR5Rh9rzaqdKKsGHnwQLcug2/gr/vRHEroWGMwxbuFWAq DVL6I8hrGWRw== X-IronPort-AV: E=McAfee;i="6000,8403,9774"; a="153252477" X-IronPort-AV: E=Sophos;i="5.77,378,1596524400"; d="scan'208";a="153252477" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 04:20:41 -0700 IronPort-SDR: aVW8cVhNf+2J4dhFjTq2WQGb0tr7VFnjb2bPIl1HN4qyx62wd2u8fy0lxIX6UGq6OCsJclV4Ae W480ZxHUeeDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,378,1596524400"; d="scan'208";a="531216665" X-Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.66]) by orsmga005.jf.intel.com with ESMTP; 15 Oct 2020 04:20:39 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Yuwei Chen , Michael D Kinney , Sean Brogan Subject: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64 Date: Thu, 15 Oct 2020 19:20:37 +0800 Message-Id: <20201015112037.26556-1-bob.c.feng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,bob.c.feng@intel.com X-Gm-Message-State: iKFh7ekVQr59wb2vKI6EfLE1x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1602760844; bh=jSWdF9bGL53c6Z3R6ioqXNw6kcv9Dc6c5gQrp0bgShU=; h=Cc:Date:From:Reply-To:Subject:To; b=KAEXl5RoHTeYQxZzQWHeiyGUkj0UpfzLd98smT/utT+0buKXCcQSMTRhEAuKjJ2TL34 qa8s05tVdaeSBHmzYFqly3cfN7Cz8ocSOjWK32iBatXQ3+TaoYJsXJO4qzkfHZsABEc0O jctiZXl+K8cTADw6GZADnUlNq/q8eNVC3JY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3001 When the 64-bit version of VS compiler is used, the generated PcdValueInit tool will be failed to compile.=20 This patch is going to fix that issue. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Michael D Kinney Cc: Sean Brogan Reviewed-by: Sean Brogan --- BaseTools/Source/C/Common/PcdValueCommon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/C/Common/PcdValueCommon.h b/BaseTools/Source/= C/Common/PcdValueCommon.h index cfd3bb76e1..1652bd5430 100644 --- a/BaseTools/Source/C/Common/PcdValueCommon.h +++ b/BaseTools/Source/C/Common/PcdValueCommon.h @@ -12,11 +12,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include =20 #define __FIELD_SIZE(TYPE, Field) (sizeof((TYPE *)0)->Field) #define __ARRAY_ELEMENT_SIZE(TYPE, Field) (sizeof((TYPE *)0)->Field[0]) -#define __OFFSET_OF(TYPE, Field) ((UINT32) &(((TYPE *)0)->Field)) +#define __OFFSET_OF(TYPE, Field) ((UINT32)(size_t) &(((TYPE *)0)->Field)) #define __FLEXIBLE_SIZE(Size, TYPE, Field, MaxIndex) if (__FIELD_SIZE(TY= PE, Field) =3D=3D 0) Size =3D MAX((__OFFSET_OF(TYPE, Field) + __ARRAY_ELEME= NT_SIZE(TYPE, Field) * (MaxIndex)), Size) #define __ARRAY_SIZE(Array) (sizeof(Array)/sizeof(Array[0])) =20 #if defined(_MSC_EXTENSIONS) #define __STATIC_ASSERT static_assert --=20 2.20.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66253): https://edk2.groups.io/g/devel/message/66253 Mute This Topic: https://groups.io/mt/77525766/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-