Fix compiler warnings

This commit is contained in:
Quinten Kock 2020-12-04 21:36:43 +01:00
parent 42cf96ab80
commit 21a793d211
5 changed files with 8 additions and 6 deletions

View File

@ -27,11 +27,12 @@ default: bin/$(TARGET)-$(ARCH)
all: $(ARCHES) all: $(ARCHES)
$(ARCHES): $(ARCHES):
$(MAKE) ARCH=$@ @$(MAKE) ARCH=$@
bin/$(TARGET)-$(ARCH): $(OBJ) bin/$(TARGET)-$(ARCH): $(OBJ)
@mkdir -p $(@D) @mkdir -p $(@D)
$(LD) $(LDFLAGS) $(OBJ) -o $@ @echo Linking $@
@$(LD) $(LDFLAGS) $(OBJ) -o $@
obj/$(ARCH)/%.o: src/%.c $(HFILES) obj/$(ARCH)/%.o: src/%.c $(HFILES)
@mkdir -p $(@D) @mkdir -p $(@D)

View File

@ -1,9 +1,10 @@
#include "vga.h" #include "vga.h"
#include <hal/ops.h> #include <hal/ops.h>
#include <print/print.h>
void panic(const char *message, const char *filename, int line) { void panic(const char *message, const char *filename, int line) {
vga_clear(VGA_BLUE); vga_clear(VGA_BLUE);
printf("KernOS kernel panic:\n%s\n", message); printf("KernOS kernel panic:\n%s\n", message);
printf("at %s:%d", filename, line); printf("at %s:%d", filename, line);
halt_catch_fire(); halt_catch_fire();
} }

View File

@ -58,4 +58,4 @@ void vga_clear(uint8_t color) {
} }
terminal_row = 0; terminal_row = 0;
terminal_column = 0; terminal_column = 0;
} }

View File

@ -22,4 +22,4 @@ void vga_putc(char c);
void vga_puts(const char *c); void vga_puts(const char *c);
void vga_setcolor(uint8_t color); void vga_setcolor(uint8_t color);
void vga_write_elsewhere(const char *c, size_t y, size_t x); void vga_write_elsewhere(const char *c, size_t y, size_t x);
void vga_clear(uint8_t color); void vga_clear(uint8_t color);

View File

@ -1,4 +1,4 @@
void halt_catch_fire(); void halt_catch_fire();
#define PANIC(m) panic(m, __FILE__, __LINE__) #define PANIC(m) panic(m, __FILE__, __LINE__)
void panic(const char *message, const char *filename, int line); void panic(const char *message, const char *filename, int line);