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

Fix for Clang dev_mode Windows build #77165

Merged
merged 1 commit into from
May 17, 2023

Conversation

bitsawer
Copy link
Member

Adds a fix / workaround for dev_mode (all warnings and warnings as errors) build when building for Windows using Clang. Seems like a Clang issue, GCC apparently doesn't enable these warnings for -Wall.

Alterantively, we could maybe add -Wno-missing-field-initializers and -Wno-missing-braces when building with Clang to avoid these in the future, but this is probably a pretty rare issue.

Clang error:

platform\windows\display_server_windows.cpp:670:31: error: missing field 'biWidth' initializer [-Werror,-Wmissing-field-initializers]
                                BITMAPINFO bmp_info = { 0 };
                                                          ^
platform\windows\display_server_windows.cpp:670:29: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
                                BITMAPINFO bmp_info = { 0 };
                                                        ^
                                                        {}
platform\windows\display_server_windows.cpp:670:31: error: missing field 'bmiColors' initializer [-Werror,-Wmissing-field-initializers]
                                BITMAPINFO bmp_info = { 0 };
                                                          ^
3 errors generated.

@akien-mga akien-mga merged commit da21cb7 into godotengine:master May 17, 2023
@akien-mga
Copy link
Member

Thanks!

@bitsawer bitsawer deleted the fix_clang_build branch May 17, 2023 18:48
@YuriSizov
Copy link
Contributor

This shouldn't be cherry-picked as it fixes an issue introduced in #75142, which wasn't cherry-picked.

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

Successfully merging this pull request may close these issues.

4 participants