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

Refactoring: check function return Status marked as [[nodiscard]] #1214

Merged
merged 2 commits into from
Jan 2, 2023

Conversation

torwig
Copy link
Contributor

@torwig torwig commented Dec 29, 2022

Check all the return values of the Status type if they are marked as [[nodiscard]].
Some functions were refactored so that now they return Status instead of bool or void; some functions now didn't return Status.

Closes: #1196

@PragmaTwice
Copy link
Member

PragmaTwice commented Jan 1, 2023

Great changes. Since all warnings are fixed, could you modify the CMakeFiles to make the warning as error? You can just follow this TODO, and put -Werror=unused-result to L181.

https://github.com/apache/incubator-kvrocks/blob/09d3d18dd9d4e2afebdda13560a8de392b0540d1/CMakeLists.txt#L180-L181

@torwig
Copy link
Contributor Author

torwig commented Jan 1, 2023

@PragmaTwice Done.

@torwig
Copy link
Contributor Author

torwig commented Jan 2, 2023

Thanks all. Merging...

@torwig torwig merged commit 52b0a61 into apache:unstable Jan 2, 2023
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.

Fix all unused-return-value warnings for Status
4 participants