From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (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 6FBD41A1E3A for ; Mon, 24 Oct 2016 06:01:35 -0700 (PDT) Received: by mail-wm0-x235.google.com with SMTP id c78so114571929wme.1 for ; Mon, 24 Oct 2016 06:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=cp17GQpXHVB2BANgOrdb23sNcAJ7tf8ALhBYF/A6AiA=; b=FnsNup7y9FP8DGZN4Pj+A0/Mn46gR15nWosfXkHjd0RvxSvx8DaF+T4eAiAupYqj0A kBxVrpFH7CRIxVz0s0Qpnee3y4xvdFZx3+9nJAW0BH2q5JuGCRDOtvA6QdD3BpLU4cz3 /ew+0Dl/6PVCJoa8W16wNCLXVn6Kpque5VNkA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cp17GQpXHVB2BANgOrdb23sNcAJ7tf8ALhBYF/A6AiA=; b=Xr2fz0v61c2kGZ0E3UPFtfneaPL1ORIJRHFlhkgrIRiQJVcpgPDvKlwtSg4BjW0Y4v /WF+Ou9z55RBQ9XesSZczmMigGrr/bR0EepCxwVxbZ7V3pQRka+pjL6P4NTVicfY8XA2 /5HTYzVgVPFEn2Pv/Ivrowvdlwj2oHwxnrgys8/QWZyPSaKdoQfWVYBV2rF7W9X+rt+i 0VqsAJk7+p8JmSlqbMpkQ+wzJslGYXnTlY0d3zuAef78zC3iGmtlPn2ujwqFsoQpknd2 RuFpGHVermcTPzNHrYmbfFNC3vqo6IdolE7KQQKVpunLGyse6Kbe0cF8muTp1KqTpapN 9ExQ== X-Gm-Message-State: AA6/9RkW8CHMmcn3theIgzRF8zNUCe962HzwGy6XLxQ732QvuzFrfB6V4th1zjf1qKm0hcjB X-Received: by 10.28.132.130 with SMTP id g124mr23236133wmd.37.1477314090443; Mon, 24 Oct 2016 06:01:30 -0700 (PDT) Received: from localhost.localdomain ([105.146.229.54]) by smtp.gmail.com with ESMTPSA id 198sm14677375wmn.14.2016.10.24.06.01.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Oct 2016 06:01:29 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, lersek@redhat.com, Ard Biesheuvel Date: Mon, 24 Oct 2016 14:01:15 +0100 Message-Id: <1477314075-18874-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [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 13:01:35 -0000 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; } -- 2.7.4