blob: ea3c306fd7dfb8142595a0b8c694b648d73beac6 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From c782e208021409e9b78acb2200abd4319072e78a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 2 Sep 2022 00:28:05 -0700
4Subject: [PATCH] Fix type of the void pointer assignment
5
6Fixes build with clang
7
8x86-common.c:216:9: error: incompatible integer to pointer conversion assigning to 'void *' from 'long' [-Wint-conversion]
9 offset = mem_info.offset - REAL_MEM_BASE;
10 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 x86-common.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/x86-common.c b/x86-common.c
19index 137bc3c..6f737ed 100644
20--- a/x86-common.c
21+++ b/x86-common.c
22@@ -213,7 +213,7 @@ void *LRMI_common_init(int high_page)
23 if (!real_mem_init(high_page))
24 return NULL;
25
26- offset = mem_info.offset - REAL_MEM_BASE;
27+ offset = (void*)(mem_info.offset - REAL_MEM_BASE);
28
29 /*
30 Map the Interrupt Vectors (0x0 - 0x400) + BIOS data (0x400 - 0x502)
31--
322.37.3
33