Build error when setting LV_ATTRIBUTE_MEM_ALIGN in lv_draw_label.c


We are using LVGL 7.11 in our project. We’re running out of flash so we’re changing from -O2 to -Os to get some more free space.

However, when we change to -Os we get a build error:

external/lvgl/src/lv_draw/lv_draw_label.c: In function 'lv_draw_label':
external/lvgl/src/lv_draw/lv_draw_label.c:307:24: error: 'color' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             lv_color_t color = dsc->color;

We have updated these:

#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(LV_ATTRIBUTE_MEM_ALIGN_SIZE)))

Any advice?