From 07ed91a0b730e84ac351748fcefc4c846ff7d5ba Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Thu, 15 Apr 2021 18:27:11 +0200 Subject: Fix warnings --- src/bd-font.c | 2 +- src/main.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bd-font.c b/src/bd-font.c index 9795860..6173e97 100644 --- a/src/bd-font.c +++ b/src/bd-font.c @@ -1,4 +1,4 @@ -static u8 font[][8] = { +static const u8 font[][8] = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x24, 0x00, 0x42, 0x3c, 0x00, 0x00}, {0x00, 0x00, 0x24, 0x00, 0x3c, 0x42, 0x00, 0x00}, diff --git a/src/main.c b/src/main.c index 2a6abb3..720f77e 100644 --- a/src/main.c +++ b/src/main.c @@ -234,9 +234,9 @@ wait_vsync() { // memory, instead we need to read a u16 word, mask and or the corresponding // bits and wave the updated u16. static inline void -put_pixel_m4(int x, int y, u8 col_index, u16 *buffer) { +put_pixel_m4(int x, int y, u8 col_index, vu16 *buffer) { int buffer_index = (y * SCREEN_WIDTH + x) / 2; - u16 *destination = &buffer[buffer_index]; + vu16 *destination = &buffer[buffer_index]; // Odd pixels will go to the top 8 bits of the destination. Even pixels to // the lower 8 bits. int odd = x & 0x1; @@ -248,7 +248,7 @@ put_pixel_m4(int x, int y, u8 col_index, u16 *buffer) { } static inline void -draw_fill_rect_m4(int x0, int y0, int x1, int y1, u8 col_index, u16 *buffer) { +draw_fill_rect_m4(int x0, int y0, int x1, int y1, u8 col_index, vu16 *buffer) { int ix, iy; for(iy = y0; iy < y1; iy++) { for(ix = x0; ix < x1; ix++) { @@ -257,7 +257,7 @@ draw_fill_rect_m4(int x0, int y0, int x1, int y1, u8 col_index, u16 *buffer) { } } -static inline u16 +static inline void flip_page() { DISP_CONTROL ^= DISP_CONTROL_PAGE; } -- cgit v1.2.1