Closed escherstair closed 1 year ago
Cppcheck gives a list of potential issues in the files and I suggest to fix all of them. @avisconti if you agree I can make a PR. Let me know
Yes, pls. If you can prepare a PR like this I will review it! Thanks for your help.
I decided to fix in a different way. @avisconti can you have a look to the PR, please?
I used cppcheck tool to do a static analysis of the source code, and I get some potential issues. As an example, in the following snippet of code https://github.com/STMicroelectronics/iis3dwb-pid/blob/b85e3d23bbc5806011dd202a528308099cb24204/iis3dwb_reg.c#L438-L449 if the first
iis3dwb_read_reg()
fails (and returnsret != 0
), the secondiis3dwb_read_reg()
is not executed, and so theswitch()
accesses toctrl6_c.xl_axis_sel
uninitialized. I suggest to change this snippet intoCppcheck gives a list of potential issues in the files and I suggest to fix all of them. @avisconti if you agree I can make a PR. Let me know