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 initialization order in gtest helper #4296

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

vlstill
Copy link
Contributor

@vlstill vlstill commented Dec 17, 2023

In #4287 I've accidentally create use of unitialized value in test because of initialization order of the RedirectStderr. This fixes it by making sure the stringstream is initialized first.

@vlstill vlstill self-assigned this Dec 17, 2023
Copy link
Collaborator

@fruffy fruffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't our CI have caught this? Why didn't the -Werror work?

@vlstill
Copy link
Contributor Author

vlstill commented Dec 19, 2023

This ways found by clang... maybe gcc ignored it for some reason... we should probably have a build with clang too (I can add that), my experience is that each of them has some warnings the other is missing.

@vlstill vlstill merged commit 0ca3791 into p4lang:main Dec 19, 2023
13 checks passed
@vlstill vlstill deleted the fix-init-order branch December 19, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants