From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 62949941A2D for ; Tue, 6 Feb 2024 16:19:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=eMDV2n5gjHZLChfyKWuTlop7U9M/xkzCfqWM+hHB2oQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1707236387; v=1; b=LhVWK8W1VFZSAn1d/xClj9oV+vXmbB9MC9fU6DFtWPe1tbzqvwWGV4Au4iKiLlzFy02W0TPA vZorPX6/mkZ20ZQmPvpeHBv+hrVRs5EZJzZXS94c8Q1ovh5EC6CqAtX/hpNuvZ/VLk/wHPq6mlo A7jlSJ/xtMUicboyAMVbdTDo= X-Received: by 127.0.0.2 with SMTP id wcpnYY7687511xKcclqQGU0P; Tue, 06 Feb 2024 08:19:47 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mx.groups.io with SMTP id smtpd.web11.25438.1707236386498527556 for ; Tue, 06 Feb 2024 08:19:46 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10976"; a="939580" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="939580" X-Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 08:19:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="1068492" X-Received: from njayapra-mobl.gar.corp.intel.com ([10.213.98.126]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 08:19:41 -0800 From: "Jayaprakash, N" To: devel@edk2.groups.io Cc: Jayaprakash N , Rebecca Cran , Michael D Kinney , Laszlo Ersek , Leif Lindholm , Ard Biesheuvel , Abner Chang Subject: [edk2-devel] [edk2 Patch 2 1/1] EmbeddedPkg: compiler error due to arithmetic operation on void pointer Date: Tue, 6 Feb 2024 21:49:31 +0530 Message-Id: <20240206161931.530-2-n.jayaprakash@intel.com> In-Reply-To: <20240206161931.530-1-n.jayaprakash@intel.com> References: <20240206161931.530-1-n.jayaprakash@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: 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,n.jayaprakash@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: GDmmNW1qBKrNzv3Va7oicfvQx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=LhVWK8W1; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4668 This commit fixes the issue reported in the BZ4668. The EmbeddedPkg fails to compile with a compiler error generated due to invalid/illegal arithmetic operation on void pointers. It has been fixed by using explicit type conversion of the void pointer to UINTN. Cc: Rebecca Cran Cc: Michael D Kinney Cc: Laszlo Ersek Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Abner Chang Cc: Jayaprakash N Signed-off-by: Jayaprakash N --- .../Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c index fa81cc9d59..f4077c04a7 100644 --- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c +++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c @@ -308,7 +308,7 @@ ReallocatePool ( if (OldBuffer != NULL) { HandOffHob = GetHobList (); ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)OldBuffer >= HandOffHob->EfiMemoryBottom)); - ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)(OldBuffer + OldSize) <= HandOffHob->EfiFreeMemoryBottom)); + ASSERT (((EFI_PHYSICAL_ADDRESS)((UINTN)OldBuffer + OldSize) <= HandOffHob->EfiFreeMemoryBottom)); } DEBUG_CODE_END (); -- 2.40.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115179): https://edk2.groups.io/g/devel/message/115179 Mute This Topic: https://groups.io/mt/104200842/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-