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

Silence warning for unused variable rsp in class unsubscribe_response #425

Closed
wants to merge 1 commit into from

Conversation

tnorth
Copy link

@tnorth tnorth commented Feb 28, 2023

Trivial change to avoid the warning for unused variable rsp, problematic when using -Werror in a project including server_response.h as header.

Trivial change to avoid the warning for unused variable `rsp`, problematic when using Werror in a project including server_response.h as header.
@fpagliughi
Copy link
Contributor

fpagliughi commented Jun 26, 2023

Hey, thanks for the PR! I'm just getting back to a new release of this project after a while.

Unfortunately, as this is an Eclipse project, I can't merge anything without a signed ECA. And I don't think it would be woth your time with something so trivial. I can fix it.

But, with C++, my preferred way would be to comment out the parameter rather than the C trick of using (void) inside the function body, so:

unsubscribe_response(MQTTAsync_successData* /*rsp*/) {}

But more importantly, you made me realize that this project doesn't have build warnings turned on at all. (Sorry the CMake build was done years ago by someone else). So I'm fixings that as well... and it uncovered a bug in the synchronous client!

So, thanks again. This was helpful.

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.

None yet

2 participants