Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 1 | From c782e208021409e9b78acb2200abd4319072e78a Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 2 Sep 2022 00:28:05 -0700 |
| 4 | Subject: [PATCH] Fix type of the void pointer assignment |
| 5 | |
| 6 | Fixes build with clang |
| 7 | |
| 8 | x86-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 | |
| 12 | Upstream-Status: Pending |
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 14 | --- |
| 15 | x86-common.c | 2 +- |
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 17 | |
| 18 | diff --git a/x86-common.c b/x86-common.c |
| 19 | index 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 | -- |
| 32 | 2.37.3 |
| 33 | |