[PATCH 3/5] i386/kexec-mb2-x86.c: cast ints to uintptr_t before pointers to avoid warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
---
 kexec/arch/i386/kexec-mb2-x86.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kexec/arch/i386/kexec-mb2-x86.c b/kexec/arch/i386/kexec-mb2-x86.c
index 1ad8aed..b4996bc 100644
--- a/kexec/arch/i386/kexec-mb2-x86.c
+++ b/kexec/arch/i386/kexec-mb2-x86.c
@@ -360,13 +360,13 @@ static uint64_t multiboot2_make_mbi(struct kexec_info *info, char *cmdline, int
 	}
 
 out:
-	return (uint64_t) ptrorig;
+	return (uint64_t) (uintptr_t) ptrorig;
 }
 
 static uint64_t multiboot2_mbi_add_module(void *mbi_buf, uint64_t mbi_ptr, uint32_t mod_start,
 					  uint32_t mod_end, char *mod_clp)
 {
-	struct multiboot_tag_module *tag = (struct multiboot_tag_module *) mbi_ptr;
+	struct multiboot_tag_module *tag = (struct multiboot_tag_module *) (uintptr_t) mbi_ptr;
 
 	tag->type = MULTIBOOT_TAG_TYPE_MODULE;
 	tag->size = sizeof(struct multiboot_tag_module) + strlen((char *)(long) mod_clp) + 1;
@@ -381,7 +381,7 @@ static uint64_t multiboot2_mbi_add_module(void *mbi_buf, uint64_t mbi_ptr, uint3
 
 static uint64_t multiboot2_mbi_end(void *mbi_buf, uint64_t mbi_ptr)
 {
-	struct multiboot_tag *tag = (struct multiboot_tag *) mbi_ptr;
+	struct multiboot_tag *tag = (struct multiboot_tag *) (uintptr_t) mbi_ptr;
 
 	tag->type = MULTIBOOT_TAG_TYPE_END;
 	tag->size = sizeof (struct multiboot_tag);
-- 
2.28.0

Attachment: signature.asc
Description: PGP signature

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec

[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux