Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning C4200 occurs frequently during build on VisualStudio. #6171

Closed
ym-terada opened this issue May 2, 2024 · 2 comments
Closed

Warning C4200 occurs frequently during build on VisualStudio. #6171

ym-terada opened this issue May 2, 2024 · 2 comments
Labels

Comments

@ym-terada
Copy link

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.

@kisvegabor
Copy link
Member

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.

@lvgl-bot
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants