From 57e2a6d983e101e3e022912afae76fd984caac71 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 10 Nov 2019 21:44:27 -0800 Subject: [PATCH] fix 1bit lv_color compilation warnings/errors introduced by 3da868a0905ccbdafb4bbbf9c301d4f66eb2cf86 --- src/lv_misc/lv_color.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_misc/lv_color.h b/src/lv_misc/lv_color.h index 04551fe7f..95542afb6 100644 --- a/src/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -392,10 +392,10 @@ static inline uint8_t lv_color_brightness(lv_color_t color) /* The most simple macro to create a color from R,G and B values */ #if LV_COLOR_DEPTH == 1 -#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){(b8 >> 7 | g8 >> 7 | r8 >> 7)}) +#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){.full = (b8 >> 7 | g8 >> 7 | r8 >> 7)}) static inline lv_color_t lv_color_make(int r8, int g8, int b8) { - lv_color_t color; + lv_color_t color = { 0 }; color.full = (b8 >> 7 | g8 >> 7 | r8 >> 7); return color; }