lvgl / lvgl

Embedded graphics library to create beautiful UIs for any MCU, MPU and display type.

Home Page:https://lvgl.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning C4200 occurs frequently during build on VisualStudio.

ymh-kotaro-terada opened this issue · comments

Introduce the problem

With v8.3.11, lv_table_cell_t has zero-sized array member (char txt[]).

On VisualStudio, the following warning message occurs frequently whenever sources that includes lv_table.h are built.
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-levels-2-and-4-c4200?view=msvc-170

How can this problem be solved?

Proposal

txt[] appears to be for interpreting binary as variable length data by casting it.

I think it should be defined as txt[1] as a dummy or suppressed with #pragma or compile options.

Hi,

Thank you for reporting it. In v9 it's already char txt[1] so it should work in v8 too.

If you have time, pleas send a PR.

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.