diff options
author | David Phillips <david@yeah.nah.nz> | 2020-12-13 21:40:16 +1300 |
---|---|---|
committer | David Phillips <david@yeah.nah.nz> | 2020-12-13 21:40:16 +1300 |
commit | c641cf65258f6b7a4ba6c0434edaaf889b39717a (patch) | |
tree | 5745478b030cc005aaa9f71a6c81fd349bc1a9bb | |
parent | 5eaf06d25c23a33a4e921161e9f0786a88e2948f (diff) | |
download | altimeter-c641cf65258f6b7a4ba6c0434edaaf889b39717a.tar.xz |
Remove unneeded variables
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | display_sim.c | 3 |
2 files changed, 3 insertions, 4 deletions
@@ -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++); |