Warnings give compile errors


Perhaps this is not the right place, but here goes.

I am currently writing an application for a state estimator, using the px4 SITL with gazebo. I build the project using “make posix_sitl_default gazebo”. When I do this, I get build errors whenever I have an unused or not set variable. This is quite annoying. Do you know how to make the compiler less strict on this?

Thanks in advance

error: unused variable ‘taux’ [-Werror=unused-variable] float taux = 0;

Fixed it: If somebody else has this issue, you can outcomment -Werror in Firmware/cmake/px4_base.cmake

1 Like

Thanks. Saved the day

In the latest code, -Werror is in ./cmake/px4_add_common_flags.cmake