2018-11-14 03:53 PM
I compile my code with -Wunused-parameter and I get many "warning: unused parameter …" for the STM32F4 HAL.
Would be great if this can be fixed in the library. I don't want to change the library and then have to maintain the changes.
Thanks!
Harjit
2018-11-15 03:36 AM
- Doctor, when I do this, it pains!
- Do not do this.
2018-11-15 02:29 PM
I disagree.
I don't think anyone intentionally adds extra parameters or variables. Which means it is a mistake and so should be fixed.
2018-11-15 07:07 PM
In ideal world, yes. In reality, as we see, ST is not very agile with the libraries - so unlikely you will get this proposal fulfilled in reasonable time frame.
So what? Specify more relaxed checking for code that you don't control.
Specially for this situation, many linters have concept of "library files", that's the code that we do not control and do not want to see noise about it.
Regards,
-- pa
2018-11-16 12:13 AM
I need to agree with Pavel. There is no point in complaining about third-party code.
All toolchains I know allow individual settings for files, so enable "-Wall" or whatever for your own sources.
In my company, we use to exclude such third-party code from any lint/Misra checks, for example.
2018-11-16 06:22 AM
Hi @Singh.Harjit ,
It is interesting to know with which files do you see such warnings?
If it is related to drivers delivered by ST, we can take the action to fix them.
Otherwise, for drivers coming from third-parties, we can report the errors and let the action at their sides.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.