Fix warning

This commit is contained in:
Mario Hüttel 2022-10-23 18:32:16 +02:00
parent 1402dad8c3
commit 0e10c7048f
2 changed files with 3 additions and 3 deletions

View File

@ -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
####################################################################################

4
main.c
View File

@ -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;