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

refactor: enable warning on unused result #1248

Merged
merged 2 commits into from
Nov 24, 2022

Conversation

acelyc111
Copy link
Member

@acelyc111 acelyc111 commented Nov 19, 2022

#1166

Deal with function return value to ensure seriours error could be found immediatelly.
You can add macro WARN_UNUSED_RESULT after the function declaration to mark the function's return value must be dealt.
This patch add the macro and make command_manager::register_command as WARN_UNUSED_RESULT, all callers have been refactored to adapt this semantics. It's a guarantee that related objects are destroyed in a meaningful order.

src/block_service/directio_writable_file.cpp Outdated Show resolved Hide resolved
src/block_service/directio_writable_file.cpp Show resolved Hide resolved
src/block_service/test/fds_service_test.cpp Outdated Show resolved Hide resolved
src/block_service/test/fds_service_test.cpp Outdated Show resolved Hide resolved
src/block_service/test/fds_service_test.cpp Outdated Show resolved Hide resolved
src/utils/command_manager.cpp Outdated Show resolved Hide resolved
src/utils/logging.cpp Outdated Show resolved Hide resolved
src/utils/simple_logger.h Outdated Show resolved Hide resolved
src/utils/logging_provider.h Outdated Show resolved Hide resolved
src/utils/logging_provider.h Outdated Show resolved Hide resolved
@acelyc111 acelyc111 merged commit d54e05f into apache:master Nov 24, 2022
@empiredan empiredan mentioned this pull request Aug 17, 2023
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.

3 participants