diff options
author | dzwdz | 2021-07-18 16:51:48 +0200 |
---|---|---|
committer | dzwdz | 2021-07-18 16:51:48 +0200 |
commit | ca5ce39490d4df893f8285f940602dc140b29247 (patch) | |
tree | 25ce367769b97a83151ed3c9b09b7135145b9739 /src | |
parent | 656e1407f440e9b7665d2e910a7fa2f5d851a1bd (diff) |
fix most current compiler warnings
stack_top got changed into a char, because `extern void` isn't even
valid. others are self-explanatory
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/arch/generic.h | 2 | ||||
-rw-r--r-- | src/kernel/arch/i386/interrupts/isr.c | 8 | ||||
-rw-r--r-- | src/kernel/arch/i386/tty.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/kernel/arch/generic.h b/src/kernel/arch/generic.h index 17980fd..e06ac27 100644 --- a/src/kernel/arch/generic.h +++ b/src/kernel/arch/generic.h @@ -7,7 +7,7 @@ #define PAGE_SIZE 4096 // src/arch/i386/boot.s -extern void stack_top; +extern char stack_top; __attribute__((noreturn)) void halt_cpu(); diff --git a/src/kernel/arch/i386/interrupts/isr.c b/src/kernel/arch/i386/interrupts/isr.c index d2e3d0f..35796fa 100644 --- a/src/kernel/arch/i386/interrupts/isr.c +++ b/src/kernel/arch/i386/interrupts/isr.c @@ -4,21 +4,23 @@ #include <stdbool.h> #include <stdint.h> +#define UNUSED __attribute__((unused)) + bool isr_test_interrupt_called = false; __attribute__((interrupt)) -void isr_double_fault(struct interrupt_frame *frame) { +void isr_double_fault(UNUSED struct interrupt_frame *frame) { log_const("#DF"); panic(); } __attribute__((interrupt)) -void isr_general_protection_fault(struct interrupt_frame *frame) { +void isr_general_protection_fault(UNUSED struct interrupt_frame *frame) { log_const("#GP"); panic(); } __attribute__((interrupt)) -void isr_test_interrupt(struct interrupt_frame *frame) { +void isr_test_interrupt(UNUSED struct interrupt_frame *frame) { isr_test_interrupt_called = true; } diff --git a/src/kernel/arch/i386/tty.c b/src/kernel/arch/i386/tty.c index b9ebdb6..0858bd7 100644 --- a/src/kernel/arch/i386/tty.c +++ b/src/kernel/arch/i386/tty.c @@ -10,7 +10,7 @@ static struct vga_cell *vga = (void*) 0xB8000; static size_t vga_pos = 0; static void tty_scroll() { - for (int i = 0; i < vga_len - 80; i++) { + for (size_t i = 0; i < vga_len - 80; i++) { vga[i] = vga[i + 80]; } vga_pos -= 80; |