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 94411D801EA for ; Tue, 6 Feb 2024 05:23:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=+ertyYKV4RIhi2EwOXguUmD20cXoKVR09p8nWUsIY/w=; 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=1707197025; v=1; b=Up2kZWGRKYkpSqZIEPc85h44pJM/FOVhB0pIRP1em6+KKhAjSrhylvYL4MWADFfdRnbWoreb PauE0tf10dTKhKwQE8QkNoWek0/YEKyGOydscTBBFD21NBmOZrpuTmZUcyBrgfGDxkzQisGpi1R XktbyOqQzCZ+hqbdGfuYFWf4= X-Received: by 127.0.0.2 with SMTP id MVy6YY7687511x9HzS4GdHLU; Mon, 05 Feb 2024 21:23:45 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mx.groups.io with SMTP id smtpd.web11.15543.1707197020099977205 for ; Mon, 05 Feb 2024 21:23:44 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="559682" X-IronPort-AV: E=Sophos;i="6.05,246,1701158400"; d="scan'208";a="559682" X-Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2024 21:23:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,246,1701158400"; d="scan'208";a="1198769" X-Received: from njayapra-mobl.gar.corp.intel.com ([10.66.106.253]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2024 21:23:42 -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 1/1] EmbeddedPkg: compiler error due to arithmetic operation on void pointer Date: Tue, 6 Feb 2024 10:53:20 +0530 Message-Id: <20240206052320.1233-2-n.jayaprakash@intel.com> In-Reply-To: <20240206052320.1233-1-n.jayaprakash@intel.com> References: <20240206052320.1233-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: DG7MnF0zgd5lisCwgwfcIpQVx7686176AA= 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=Up2kZWGR; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) 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..11566cf57f 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)((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 (#115145): https://edk2.groups.io/g/devel/message/115145 Mute This Topic: https://groups.io/mt/104193285/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-