diff --git a/cpu/exception.c b/cpu/exception.c index 3e94c5f..014408f 100644 --- a/cpu/exception.c +++ b/cpu/exception.c @@ -173,7 +173,7 @@ static void isr31(struct interrupt_descriptor_32 *frame) { } -void exception_handlers_init() { +void exception_handlers_init(void) { idt_register_handler(0, (size_t)isr0); idt_register_handler(1, (size_t)isr1); idt_register_handler(2, (size_t)isr2); diff --git a/cpu/exception.h b/cpu/exception.h index 12a35ff..57f9ce2 100644 --- a/cpu/exception.h +++ b/cpu/exception.h @@ -1,6 +1,6 @@ #ifndef _EXCEPTION_H #define _EXCEPTION_H -void exception_handlers_init(); +void exception_handlers_init(void); #endif \ No newline at end of file diff --git a/cpu/idt.c b/cpu/idt.c index 6377cc9..24b0fa8 100644 --- a/cpu/idt.c +++ b/cpu/idt.c @@ -6,7 +6,7 @@ struct interrupt_descriptor_32 idt[256]; static size_t idt_ptr[2]; -void idt_init() { +void idt_init(void) { size_t idt_address = (size_t)idt; idt_ptr[0] = (sizeof (struct interrupt_descriptor_32) * 256) + ((idt_address & 0xffff) << 16); idt_ptr[1] = idt_address >> 16; diff --git a/cpu/idt.h b/cpu/idt.h index b120d71..149f34e 100644 --- a/cpu/idt.h +++ b/cpu/idt.h @@ -16,7 +16,7 @@ struct interrupt_descriptor_32 { uint16_t offset_2; // offset bits 16..31 } __attribute__((__packed__)); -void idt_init(); +void idt_init(void); void idt_register_handler(uint8_t interrupt, size_t address); #endif diff --git a/ps2/keyboard.c b/ps2/keyboard.c index f40dea9..5e82e08 100644 --- a/ps2/keyboard.c +++ b/ps2/keyboard.c @@ -58,7 +58,7 @@ end: pic_send_eoi(1); } -void keyboard_init() { +void keyboard_init(void) { pic_irq_clear_mask(1); idt_register_handler(33, (size_t)irq); inb(0x60); diff --git a/ps2/keyboard.h b/ps2/keyboard.h index 9717375..4179978 100644 --- a/ps2/keyboard.h +++ b/ps2/keyboard.h @@ -1,6 +1,6 @@ #ifndef _KEYBOARD_H #define _KEYBOARD_H -void keyboard_init(); +void keyboard_init(void); #endif diff --git a/std/kstd.c b/std/kstd.c index c4f962c..3dbebe3 100644 --- a/std/kstd.c +++ b/std/kstd.c @@ -118,7 +118,8 @@ void kputs(const char* data) { kprintf("%s\n", data); } -void kabort() { +__attribute__((__noreturn__)) +void kabort(void) { kprintf("kabort(): halting kernel...\n"); asm volatile("cli"); asm volatile("hlt"); diff --git a/std/kstd.h b/std/kstd.h index a80202d..ae036ce 100644 --- a/std/kstd.h +++ b/std/kstd.h @@ -6,6 +6,8 @@ int kputchar(int ic); int kprintf(const char* restrict format, ...); void kputs(const char* data); -void kabort(); + +__attribute__((__noreturn__)) +void kabort(void); #endif \ No newline at end of file