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

Prevent use of possibly-uninitialized local variables #1433

Merged
merged 1 commit into from May 10, 2023
Merged

Conversation

hainest
Copy link
Contributor

@hainest hainest commented May 10, 2023

These were found using cppcheck's uninitvar and eraseDereference.

For the usages of iterator-like classes in process.C, they aren't strictly uninitialized variable usages since the classes in question are standard layout types. It would be better to replace the usages there with list construction to avoid the static check altogether.

@hainest hainest added the code cleanup Bring the code up to modern standards or remove deprecated features label May 10, 2023
@hainest hainest requested a review from kupsch May 10, 2023 15:19
@hainest hainest self-assigned this May 10, 2023
These were found using cppcheck's uninitvar and eraseDereference.

For the usages of iterator-like classes in process.C, they aren't strictly
uninitialized variable usages since the classes in question are standard
layout types. It would be better to replace the usages there with list
construction to avoid the static check altogether.
@hainest hainest merged commit c4a4228 into master May 10, 2023
2 checks passed
@hainest hainest deleted the fix_uninit_var branch May 10, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Bring the code up to modern standards or remove deprecated features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants