From 901e5468e8bf2620e356e87aa078c906d5548bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 9 Oct 2017 17:57:54 +0200 Subject: [PATCH] application: fix overflow warning --- application.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.c b/application.c index 0862e24..5e45835 100644 --- a/application.c +++ b/application.c @@ -360,7 +360,7 @@ static void clock_hours(void) for (uint16_t i=0; i<512; i++) { // fade hour marks in and out uint8_t brightness = (i>255 ? 512-i-1 : i); // get fade brightness for (uint8_t hour=0; hour<12; hour++) { // set all hour colors - uint16_t led = LED_WS2812B_LEDS*hour/12; // get LED four hour mark + uint16_t led = (uint16_t)(LED_WS2812B_LEDS*hour)/12; // get LED four hour mark clock_leds[led*3+0] = brightness; // set brightness clock_leds[led*3+1] = brightness; // set brightness clock_leds[led*3+2] = brightness; // set brightness