diff --git a/Makefile b/Makefile index 67ee007..9d449b0 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ LFLAGS += -mfloat-abi=soft --disable-newlib-supplied-syscalls -nostartfiles LFLAGS += -Tstartup/stm32f030.ld -Wl,-Map=$(mapfile).map -Wl,--gc-sections -Wl,--print-memory-usage -g CFLAGS = -c -fmessage-length=0 -mlittle-endian -mthumb -mcpu=cortex-m0 -CFLAGS += -mfloat-abi=soft -nostartfiles -Wall -g3 -O0 +CFLAGS += -mfloat-abi=soft -nostartfiles -Wall -Wextra -g3 -O0 #################################################################################### diff --git a/main.c b/main.c index 1fda20c..7b62b33 100644 --- a/main.c +++ b/main.c @@ -107,7 +107,7 @@ static void set_angle(uint32_t led_count, uint32_t pos, uint32_t width, const st } /* Set the rest ring to rest color */ - for (idx = upper_end + 1; idx < (upper_end + 1 + (led_count - width)); idx++) { + for (idx = upper_end + 1; idx < (upper_end + 1 + (int32_t)(led_count - width)); idx++) { mapped_idx = map_index_to_range(idx, led_count); dmx_universe_set_rgbw(mapped_idx, rest); } @@ -234,7 +234,7 @@ static bool mode_is_continuous(enum color_mode mode) int main(void) { - int i; + unsigned int i; uint8_t port; uint8_t button_pressed; enum color_mode mode = MODE_DMX_SHUTDOWN;