gotzl / hid-fanatecff

Driver to support FANATEC input devices, in particular ForceFeedback of various wheel-bases
GNU General Public License v2.0
167 stars 21 forks source link

next branch fails to compile due to unused variables in GCC >= 10 #30

Closed aqxa1 closed 2 years ago

aqxa1 commented 2 years ago

It seems that some code was commented out that relies on some other variables, that are consequently no longer used: https://github.com/gotzl/hid-fanatecff/blob/f4b80a3436c6adad7afbbe1739e5189a9a86dddb/hid-ftecff.c#L930-L935

I've tested GCC 10 and 11, and both appear to set -Werror=unused-variable by default, so it won't compile.

If this isn't just a temporary change, this can be fixed by removing lines: https://github.com/gotzl/hid-fanatecff/blob/f4b80a3436c6adad7afbbe1739e5189a9a86dddb/hid-ftecff.c#L916 and https://github.com/gotzl/hid-fanatecff/blob/f4b80a3436c6adad7afbbe1739e5189a9a86dddb/hid-ftecff.c#L924

Or workaround by not treating it as an error with something like: make "CFLAGS_MODULE=-Wno-error=unused-variable"

I'm happy to open a PR if needed.

gotzl commented 2 years ago

Thanks, good idea ;)