lvgl / lv_demos

Examples, tutorials and applications for the LVGL embedded GUI library
https://lvgl.io
492 stars 366 forks source link

lv_draw_vbasic.c Line 448 causes compiler error #13

Closed buggbear closed 5 years ago

buggbear commented 6 years ago

lv_draw_vbasic.c:448 lv_color_t px_color = (lv_color_t) ((lv_color_t )&map_p[(uint32_t)col * px_size_byte]);

causes a fault

Error[Pe119]: cast to type "lv_color_t" is not allowed lvgl\lv_draw\lv_draw_vbasic.c 448

with IAR ICC compiler.

Removing the outer cast (which seems to be unnessecary) solves the issue:

lv_color_t px_color = ((lv_color_t )&map_p[(uint32_t)col * px_size_byte]);

kisvegabor commented 6 years ago

I removed the cast. Thank you for the report. See: https://github.com/littlevgl/lvgl/commit/deb8048da58d3ede643dff1e7863bc229db1e8ce