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

[3.x] Remove do{ } while(0) wrapper around error macros #52591

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

timothyqiu
Copy link
Member

@timothyqiu timothyqiu commented Sep 12, 2021

This PR is basically the 3.x version of #36011, changing do {} while (0) to if (cond) {} else ((void)0).

The main motivation to backport the PR is to suppress static analyzer warnings about using integers instead of boolean literals (while (0) instead of while (false)).

Main changes are in core/error_macro.h. These changes expose missing semicolon errors when using ERR_* macros, so other files are touched to fix them.

@timothyqiu timothyqiu added this to the 3.4 milestone Sep 12, 2021
@timothyqiu timothyqiu requested review from a team as code owners September 12, 2021 06:56
@timothyqiu timothyqiu requested a review from a team as a code owner September 12, 2021 07:03
@timothyqiu timothyqiu requested a review from a team as a code owner September 12, 2021 07:05
@akien-mga akien-mga merged commit b37776f into godotengine:3.x Sep 21, 2021
@akien-mga
Copy link
Member

Thanks!

@timothyqiu timothyqiu deleted the error-macros branch September 21, 2021 08:53
Xrayez added a commit to goostengine/goost that referenced this pull request Sep 21, 2021
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.

2 participants