From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6AB4B1A1E29 for ; Mon, 24 Oct 2016 08:36:45 -0700 (PDT) Received: by mail-lf0-x230.google.com with SMTP id d20so1881209lfj.5 for ; Mon, 24 Oct 2016 08:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1QGLsJ1JNZPQun66XpN73X0Ke62/xBegdz4cPfBzPvc=; b=igMt0mgMgX8za2LfIXkWRAzI8Qh9Ng7Cru6sYldxv2a1sb9CKk6SGLi7d7bqoUz59s WvK+44kGfYGhWyiIcJhAn8YdvlVMjS0fqe0jeMXVf5oM+vBgJFFVhITcjcCIOUR3wPT8 x3/eUU05qYVIHS6FAC1vt/rCqfd2Osu4i7kAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1QGLsJ1JNZPQun66XpN73X0Ke62/xBegdz4cPfBzPvc=; b=ik/f35yEQiCm580jjqjRYeZ21J1xyGUXXY/oyp64wQDDuGRVJJW+YBKFsO+QFXNP6x fD6X1aQnwehEZrYa3SsHK48W+V5jfd9y2bS/Tm5xRGY9FP91X3Q0OiUHnI4YhyQu0JWw QFJD2KIMwb3QnIqgCWcNa/VPxUdwNOfzh9g0eN4VResjQyCa/rxZTWslZRsw78OkU/WV BwUaetJITiK2LDzeqBlf3YCy5x2K6kIovpLhxTGkNmHr3jLg55bDoE2v+4ASID2SK9ay uGtKGa5LDlDzQJB6sEFmoK2GzGye9BejHx3JYOzKjnVIBEUvXqR5HG1WG+kO4O5qZnCF NM9Q== X-Gm-Message-State: ABUngvdoto6VD3S1dgLWQ21jmBY7bDLx2Rg7kOg43jeyQdl1uX2ndykxWokwsa/C3uy6qEDn2zT5UpdF2X1IbEOI X-Received: by 10.25.153.75 with SMTP id b72mr5978714lfe.112.1477323403109; Mon, 24 Oct 2016 08:36:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.28.78 with HTTP; Mon, 24 Oct 2016 08:36:42 -0700 (PDT) In-Reply-To: References: <1477314075-18874-1-git-send-email-ard.biesheuvel@linaro.org> From: Ryan Harkin Date: Mon, 24 Oct 2016 16:36:42 +0100 Message-ID: To: Laszlo Ersek Cc: Ard Biesheuvel , "edk2-devel@lists.01.org" , Leif Lindholm Subject: Re: [PATCH] ArmPlatformPkg/NorFlashDxe: eliminate void pointer arithmetic X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 15:36:45 -0000 Content-Type: text/plain; charset=UTF-8 On 24 October 2016 at 14:05, Laszlo Ersek wrote: > On 10/24/16 15:01, Ard Biesheuvel wrote: >> While most compilers happily allow arithmetic on void pointer, >> the RVCT compiler does not, and throws the following warning for >> NorFlashDxe: >> >> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c(894,48) : >> error #1254-D: arithmetic on pointer to void or function type >> >> Since the expression in question involves a cast from UINTN to VOID*, >> simply add some parentheses to eliminate this warning. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ard Biesheuvel >> --- >> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c >> index ca61ac5e1983..1098d9501cc7 100644 >> --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c >> +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c >> @@ -891,7 +891,7 @@ NorFlashRead ( >> SEND_NOR_COMMAND (Instance->DeviceBaseAddress, 0, P30_CMD_READ_ARRAY); >> >> // Readout the data >> - AlignedCopyMem (Buffer, (VOID *)StartAddress + Offset, BufferSizeInBytes); >> + AlignedCopyMem (Buffer, (VOID *)(StartAddress + Offset), BufferSizeInBytes); >> >> return EFI_SUCCESS; >> } >> > > Reviewed-by: Laszlo Ersek Reviewed-by: Ryan Harkin > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel