Closed RE2012 closed 4 months ago
I'm surprised that compilation fails, because trailing comma in initializer-list should be allowed in C or C++. Also, regarding image descriptions, these files are generated by the https://github.com/lvgl/lv_img_conv library.
You are right. I faced so many problems with generated code of EEZ Studio and optional EEZ framework that this also looked wrong - but it is okay. Please close this one.
A lot of bugs have been fixed in the last few releases, so I recommend that you install the latest version if you haven't already. If you notice any error, please report it. Thank you.
Describe the bug Generated arrays always have an additional comma (,) in the end causing compilation to fail as there is no additional value afterwards.
To Reproduce
in studio go to "Home" page, select "examples" and select project "eez_lvgl_demo"
click "edit project"
click on "build" button
from output folder open ui_image_logo_eez.c in any editor
go to end of the array and see the addtional comma in the end before the array is closed: 00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, <- addtional comma };
same happens with image description: const lv_img_dsc_t img_logo_eez = { .header.cf = LV_IMG_CF_RGB565A8, .header.always_zero = 0, .header.reserved = 0, .header.w = 220, .header.h = 64, .data_size = 42240, .data = img_logo_eez_map, <- addtional comma };
same with images.c: const ext_img_desc_t images[2] = { { "logo_eez", &img_logo_eez }, { "logo_lvgl", &img_logo_lvgl }, <- addtional comma };
same with flow_def.c: native_var_t native_vars[] = { { NATIVE_VAR_TYPE_NONE, 0, 0 }, <- addtional comma };
screens.h: enum ScreensEnum { SCREEN_ID_MAIN = 1, <- addtional comma };
ui.c: ActionExecFunc actions[] = { has an addtional comma after last item
Expected behavior Generated arrays should not contain a comma after last value.
Desktop (please complete the following information):
LVGL version (if used)
eez-studio version
Additional information