From 630769065d679339c94e7bda2cd1492fdef6208e Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 5 May 2019 07:31:13 -0500 Subject: [PATCH] Fix more warnings --- cpu/i386/isr.c | 2 +- cpu/i386/pmem.c | 3 +-- cpu/i386/tasking.c | 2 +- initrd/init | Bin 17944 -> 17868 bytes prog/main.c | 1 + 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/i386/isr.c b/cpu/i386/isr.c index af633c9..dece8d0 100644 --- a/cpu/i386/isr.c +++ b/cpu/i386/isr.c @@ -180,7 +180,7 @@ void isr_handler(registers_t r) { } else if (r.eax==5) { r.ebx=(uint32_t)tasking_get_errno_address(); } else if (r.eax==6) { - r.ebx=tasking_get_msg((uint32_t*)r.ebx); + r.ebx=(uint32_t)tasking_get_msg((uint32_t*)r.ebx); } else if (r.eax==7) { tasking_send_msg(r.ebx,(void*)r.ecx,r.edx); } diff --git a/cpu/i386/pmem.c b/cpu/i386/pmem.c index fcaa123..f85f1e9 100644 --- a/cpu/i386/pmem.c +++ b/cpu/i386/pmem.c @@ -1,5 +1,6 @@ #include #include "../halt.h" +#include "../../drivers/vga.h" #include #include #include @@ -38,7 +39,6 @@ void pmem_init(struct multiboot_boot_header_tag* tags) { struct multiboot_mmap_entry* orig_ptr=(struct multiboot_mmap_entry*)(((char*)tag)+16); for (struct multiboot_mmap_entry* ptr=orig_ptr;(char*)ptr<((char*)orig_ptr)+tag->size;ptr++) { if (ptr->type!=MULTIBOOT_MEMORY_AVAILABLE) continue; - uint32_t size=ptr->len; uint32_t start=ptr->addr; if (start<0x100000) continue; uint32_t end=start+ptr->len-1; @@ -51,7 +51,6 @@ void pmem_init(struct multiboot_boot_header_tag* tags) { clear_bmap_bit(i); } } - char str[256]; break; } } diff --git a/cpu/i386/tasking.c b/cpu/i386/tasking.c index e25aafe..6e4f034 100644 --- a/cpu/i386/tasking.c +++ b/cpu/i386/tasking.c @@ -86,7 +86,7 @@ void tasking_send_msg(uint32_t pid,void* msg,uint32_t size) { void* phys_addr=virt_to_phys(msg); load_address_space(task->regs.cr3); uint32_t page=find_free_pages((size/4096)+1); - map_pages(page<<12,phys_addr,(size/4096)+1,1,0); + map_pages((void*)(page<<12),phys_addr,(size/4096)+1,1,0); if (task->msg_store==NULL) { task->msg_store=malloc(sizeof(void*)*256); task->sender_store=malloc(sizeof(uint32_t)*256); diff --git a/initrd/init b/initrd/init index bcc980ce3517f19e6fe0adbd5cd9068f67b5417f..05d1fc245c565bf382872dd9d9f893b6fcba1e98 100755 GIT binary patch delta 1439 zcmah|Ylw_d7(VCw&iBokvopK1t=YM*owb*dMXs^yvdHX@by?3m6(^<(?L|OL@UQZ zMXO5kmn*5&O*Rro9je>{^9U%1D&>Y>LU;ahg)S}JOe|C0^?BE+%{cSBJ4eifE=KQ0 z;+&7&O(*7f#CkJ&B(pqkBdkD+Iti(SH_pg(kp8@-lX8x~Y?yi;dADKE!H)$FeUE<{ zeJXGG8`HNzO++7jJ5=;TY>0#&R|fMh-NwcxJx6PNn~L73!hVDZ#80I9oVBJeG< z>lEYeuMpDt_Hy`K=YoW03MV3Gf}P&M_!Cu`0)?UmL)HanMUNv`WuM#5_1p|@e6VuNKb1Ja9~Y5riKH2&@^RHN<13Mqsu$1=a(DIcn*ZM+c9RGEmGVpVXL+dB zE9Z`=&Mt|*wP#1J)7fgt)0n4YHjPLR5H;Xm#^zuI2IG_iBvXL zf8NNxpIX6<&mLJC8)n67-~!~dSS4+eZLug_AiKdHmKS1C(7I*Mg?0GV>;LdnhIiRV-czDL!qrNRSFhGtSzX}>XYO_@COT)V(mF|UGwu`@5A}~ z&UfaVduA>jq@#!Ekp!JMQ#DwYE2o5Tg5RAzT%6RFCn`W0f9ZMaoQ5Ip zOsJkvdDks44et966ys)QAWIBk-o&881yGC<9zc&;@1ZixzqBVhwdXqsia!Ox>LYV8 zBz$L4ao>;XN+=q-r(;e(C~h4?$M5v3e?!R}Hy47t2YzEWXgcN>sLYb{n6!P3EQ7(rcIoSm>_k;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