Hi @deron.chen
I was unable to reproduce on 8.9.1 / CFamily 6.20.1, using the code snippet you shared (thanks for it!), which I added to two different C++ files in the sonar-scanning-examples project.
There was one rather important fix brought to SonarQube 8.9.1 for C and C++ analysis ( SONAR-14909) but now we made sure it’s unrelated.
And I agree we have a false positive on S836, probably because fread() is not completely managed for this rule. Let me check this further; I’ll update you when I have some news.
S836 is the “Variables should be initialized before use” rule identifier, coming from our rules repository.
This identifier is shown to you when you open the rule documentation and is searchable in the rules SonarQube tab.