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 3D780D80CA0 for ; Wed, 7 Feb 2024 20:00:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lEHrZuls435FtfCF289sUIDEIa0R4SQWTKpbaXy5MSo=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707336025; v=1; b=dP16wPusFvGdfBXkGiM4io60hS+gyNaDSP2FxwHdb+hDxpPvAS6y5nBuuFJcDq9IFHleCboI Tdu9Q8aCnsEHJ1Q+j8uHaXHagK8Z49D1OInAMVu4QmkOzEzsDHck/LWEWczzK1bKD8dWq2KlTRS F0E/8K48YT9IG6kaAIUWHIWM= X-Received: by 127.0.0.2 with SMTP id FCWKYY7687511xg6hvpA8UhZ; Wed, 07 Feb 2024 12:00:25 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.8170.1707336025246802451 for ; Wed, 07 Feb 2024 12:00:25 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-yHP0eWUWPjiDpvfPIwXVrA-1; Wed, 07 Feb 2024 15:00:21 -0500 X-MC-Unique: yHP0eWUWPjiDpvfPIwXVrA-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B35F8185A780; Wed, 7 Feb 2024 20:00:20 +0000 (UTC) X-Received: from [10.39.195.126] (unknown [10.39.195.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD5751121313; Wed, 7 Feb 2024 20:00:19 +0000 (UTC) Message-ID: Date: Wed, 7 Feb 2024 21:00:18 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [edk2 Patch 2 1/1] EmbeddedPkg: compiler error due to arithmetic operation on void pointer To: Jayaprakash N , devel@edk2.groups.io Cc: Rebecca Cran , Michael D Kinney , Leif Lindholm , Ard Biesheuvel , Abner Chang References: <20240206161931.530-1-n.jayaprakash@intel.com> <20240206161931.530-2-n.jayaprakash@intel.com> From: "Laszlo Ersek" In-Reply-To: <20240206161931.530-2-n.jayaprakash@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: YOa4BKhHefrw5f8dnqMxrdFQx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=dP16wPus; 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=redhat.com (policy=none) On 2/6/24 17:19, Jayaprakash N wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4668 >=20 > 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. >=20 > 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(-) >=20 > diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocatio= nLib.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 !=3D NULL) { > HandOffHob =3D GetHobList (); > ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)OldBuffer >=3D HandOffHob->Efi= MemoryBottom)); > - ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)(OldBuffer + OldSize) <=3D Han= dOffHob->EfiFreeMemoryBottom)); > + ASSERT (((EFI_PHYSICAL_ADDRESS)((UINTN)OldBuffer + OldSize) <=3D Han= dOffHob->EfiFreeMemoryBottom)); > } > =20 > DEBUG_CODE_END (); Reviewed-by: Laszlo Ersek -=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 (#115246): https://edk2.groups.io/g/devel/message/115246 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-