From 57d912baccc05079c96924fbc02f0d096763ec33 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 4 May 2017 16:35:25 +0200 Subject: intelmetool: Use correct type for pointer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use `uintptr_t` instead of `uint32_t`, fixing the error below on 64-bit systems, where pointers are 64-bit wide. ``` cc -O0 -g -Wall -W -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-sign-compare -Wno-unused-function -c -o intelmetool.o intelmetool.c intelmetool.c: In function ‘dump_me_memory’: intelmetool.c:85:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] dump = map_physical_exact((off_t)me_clone, (void *)me_clone, 0x2000000); ^ ``` BUG=https://ticket.coreboot.org/issues/111 Change-Id: Id8d778e97090668ad9308a82b44c6b2b599fd6c3 Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/19567 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Philipp Deppenwiese Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Paul Wise (Debian) --- util/intelmetool/intelmetool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/intelmetool/intelmetool.c b/util/intelmetool/intelmetool.c index 11c2120c16..b918c3e828 100644 --- a/util/intelmetool/intelmetool.c +++ b/util/intelmetool/intelmetool.c @@ -79,7 +79,7 @@ static void rehide_me() { * so we avoid cloning to this part. */ static void dump_me_memory() { - uint32_t me_clone = 0x60000000; + uintptr_t me_clone = 0x60000000; uint8_t *dump; dump = map_physical_exact((off_t)me_clone, (void *)me_clone, 0x2000000); -- cgit v1.2.3