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

Fix unused-parameter warning #721

Merged
merged 3 commits into from
Feb 11, 2022
Merged

Fix unused-parameter warning #721

merged 3 commits into from
Feb 11, 2022

Conversation

ardabbour
Copy link

When building a package that uses this header, the compiler throws this unused parameter warning (and rightly so). This solution is probably incompatiable with Windows, so if intercompatiability is an issue, perhaps [[maybe_unused]] should be used instead, but that requires C++17: More here

When building a package that uses this header, the compiler throws this warning.
This solution is probably incompatiable with Windows.
@Timple
Copy link
Contributor

Timple commented Jan 24, 2022

Otherwise

double& Long, double& /*gamma*/)

might be an option as well.

@SteveMacenski
Copy link
Collaborator

SteveMacenski commented Jan 24, 2022

@Timple's suggestion is more in line with standard practice, if you wouldn't mind making that update? You'd do that in the cpp file, not the header file.

@ardabbour
Copy link
Author

There is no navsat_conversions.cpp seperate from the header (or I'm missing something), but I've changed it to the standard practice; should do the trick

@Timple
Copy link
Contributor

Timple commented Jan 25, 2022

Nitpick: the comment already suggests that the code is unused. Leaving the word gamma also indicates what is unused.

@ayrton04 ayrton04 merged commit 00c16c1 into cra-ros-pkg:noetic-devel Feb 11, 2022
@ayrton04
Copy link
Collaborator

Thanks!

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

4 participants