Hello @Thieum,
Thanks for the file, it was very useful!
It seems that this false positive has the same root cause than the one you describe in your other post: we are not able to find your “stdafx.h” file. So we don’t correctly parse your code, which leads to an incomplete analysis of your code, thus the false positives.
First, can you confirm that your code compiles?
If it compiles, in order to understand why we can’t find this file when Visual Studio does:
- Could you share with us the location of the file?
- In the properties of your project > Configuration properties > C/C++ > General > “Additional Include Directories”. If you add the path to the “stdafx.h” file, do you still have the same false positives?
- By any chance, do you know if your project was configured in a particular way to find “stdafx.h”?
In addition to this, could you also share the file sonar-cfamily.request.reproducer
? This file was generated at the same time than the other reproducer you got with the command Analyze.SonarLint.CFamily.CreateReproducer
(the output of this command should also contain something like: "Request config saved at: C:\Users\Path\To\The\Reproducer\sonar-cfamily.request.reproducer ")
Thanks for your help