Skip to content

Reduce Warnings - implicit-fallthrough, switch-enum, extra-semi-stmt, unneeded-member-function #1212

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

Merged
merged 5 commits into from
Sep 19, 2024

Conversation

eramongodb
Copy link
Contributor

@eramongodb eramongodb commented Sep 18, 2024

Addresses 40 Clang warnings (35 unique).

Note

The value of -Wswitch-enum is denoting code which may need to be updated given changes to a set of enumerators. The value of default: in addition to explicit enumerators is to handle representable values which may not be covered by the set of enumerators. Therefore, having both in the same switch statement is an acceptable pattern, although the default: should ideally not be necessary.

@eramongodb eramongodb self-assigned this Sep 18, 2024
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

Warning fixes are much appreciated. LGTM

@eramongodb eramongodb merged commit 7c229ac into mongodb:master Sep 19, 2024
68 of 77 checks passed
@eramongodb eramongodb deleted the cxx-warnings branch September 19, 2024 18:25
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