From c641cf65258f6b7a4ba6c0434edaaf889b39717a Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sun, 13 Dec 2020 21:40:16 +1300 Subject: Remove unneeded variables --- Makefile | 4 ++-- display_sim.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 400aeff..3c15800 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ QEMU_AVR ?= qemu-system-avr MCU ?= atmega32u4 SIM_MCU ?= atmega2560 -CFLAGS += -DF_CPU=16000000UL -mmcu=$(MCU) -O3 -SIM_CFLAGS += -DF_CPU=16000000UL -mmcu=$(SIM_MCU) -g3 -gdwarf-2 -DWDT_DISABLE +CFLAGS += -Wall -Wextra -DF_CPU=16000000UL -mmcu=$(MCU) -O3 +SIM_CFLAGS += -Wall -Wextra -DF_CPU=16000000UL -mmcu=$(SIM_MCU) -g3 -gdwarf-2 -DWDT_DISABLE $(shell mkdir -p build/{real,sim}) diff --git a/display_sim.c b/display_sim.c index b17979f..288118f 100644 --- a/display_sim.c +++ b/display_sim.c @@ -52,6 +52,7 @@ static void uart_init(void) static int uart_putc(char c, FILE *unused) { + (void)unused; UDRx = c; loop_until_bit_is_set(UCSRxA, UDREx); return 1; @@ -64,7 +65,6 @@ static FILE uart_out = FDEV_SETUP_STREAM(uart_putc, NULL, _FDEV_SETUP_WRITE); * is no background thread for doing this constantly */ void display_display(void) { - int x = 0; int y = 0; printf("\033[6A"); // hack: raw ANSI escape sequence to move up 6 printf(",--------------------.\n"); @@ -99,7 +99,6 @@ void display_init(void) void display_write(const char *text) { - size_t text_x = 0; char c = '\0'; while (cursor_x < LCD_WIDTH && *text) { c = *(text++); -- cgit v1.1