From 3b8b07ee2eb21e043a56cdc548e2be34857adb00 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 24 Aug 2021 17:12:57 +0200 Subject: replace () with (void) in function definitions `()` means that any amt of arguments will be accepted, which isn't what i want --- src/kernel/arch/i386/interrupts/idt.c | 14 +++++++------- src/kernel/arch/i386/interrupts/idt.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/kernel/arch/i386/interrupts') diff --git a/src/kernel/arch/i386/interrupts/idt.c b/src/kernel/arch/i386/interrupts/idt.c index 75c221f..d27bc61 100644 --- a/src/kernel/arch/i386/interrupts/idt.c +++ b/src/kernel/arch/i386/interrupts/idt.c @@ -27,12 +27,12 @@ struct lidt_arg { static struct idt_entry IDT[256]; static struct lidt_arg lidt_arg; -static void idt_prepare(); -static void idt_load(); -static void idt_test(); +static void idt_prepare(void); +static void idt_load(void); +static void idt_test(void); -static void idt_prepare() { +static void idt_prepare(void) { uintptr_t offset; for (int i = 0; i < 256; i++) { offset = (uintptr_t) &_isr_stubs + i * 8; @@ -50,18 +50,18 @@ static void idt_prepare() { } } -static void idt_load() { +static void idt_load(void) { lidt_arg.limit = sizeof(IDT) - 1; lidt_arg.base = (uintptr_t) &IDT; asm("lidt (%0)" : : "r" (&lidt_arg) : "memory"); } -static void idt_test() { +static void idt_test(void) { asm("int $0x34" : : : "memory"); assert(isr_test_interrupt_called); } -void idt_init() { +void idt_init(void) { idt_prepare(); idt_load(); idt_test(); diff --git a/src/kernel/arch/i386/interrupts/idt.h b/src/kernel/arch/i386/interrupts/idt.h index 5627657..6576cf9 100644 --- a/src/kernel/arch/i386/interrupts/idt.h +++ b/src/kernel/arch/i386/interrupts/idt.h @@ -1,3 +1,3 @@ #pragma once -void idt_init(); +void idt_init(void); -- cgit v1.2.3