Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Unused parameters warning #581

Closed
fvantienen opened this issue Mar 5, 2019 · 4 comments · Fixed by #584
Closed

Unused parameters warning #581

fvantienen opened this issue Mar 5, 2019 · 4 comments · Fixed by #584

Comments

@fvantienen
Copy link
Contributor

fvantienen commented Mar 5, 2019

We now need to compile with -Wno-unused-parameter in order to not get any warnings due to the estimator_interface.h having functions with unused parameters. Wouldn't it be nicer to define the __attribute__((unused)) for these parameters specifically?
This way we don't need to compile the whole autopilot project with the unused-parameter flag.

@dagar
Copy link
Member

dagar commented Mar 5, 2019

Are these parameters completely unused in ecl or only in your particular use case?
Are you building with cmake?

@fvantienen
Copy link
Contributor Author

These following functions have unused parameters:

  • virtual bool collect_gps(uint64_t time_usec, struct gps_message *gps) { return true; } (estimator_interface.h, all parameters)
  • bool Ekf::collect_gps(uint64_t time_usec, struct gps_message *gps) (gps_checks.cpp, only time_usec)

I am not building with cmake, we use our own Makefile system.

@dagar
Copy link
Member

dagar commented Mar 5, 2019

Let's just update them. I'll fix the PX4/Firmware usage.

@fvantienen
Copy link
Contributor Author

You can then also remove the -Wno-unused-parameter from the cmake file in this repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants