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

core_rpc_server: silence unused warnings #8965

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

jeffro256
Copy link
Contributor

No description provided.

@@ -2356,6 +2356,7 @@ namespace cryptonote
bool core_rpc_server::use_bootstrap_daemon_if_necessary(const invoke_http_mode &mode, const std::string &command_name, const typename COMMAND_TYPE::request& req, typename COMMAND_TYPE::response& res, bool &r)
{
res.untrusted = false;
r = false;
Copy link
Collaborator

@selsta selsta Oct 13, 2023

Choose a reason for hiding this comment

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

Can you write it like this? Or maybe add a comment that this is silencing an unused warning to avoid confusion.

Suggested change
r = false;
(void)r;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wrote it like this since it's good code practice to initialize output parameters anyways, but I could be convinced otherwise

@luigi1111 luigi1111 merged commit 4763986 into monero-project:master Nov 6, 2023
18 checks passed
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.

5 participants