xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.71k stars 95 forks source link

clean: fix some issues found by the code analysis of Visual Studio #1953

Closed shenlebantongying closed 1 week ago

shenlebantongying commented 1 week ago

It appears that the Visual Studio's Analyze → Run code analyze button is just rebuilding the project, then collect warnings.

Edit: Actually, I don't know what's the rule it follows. It seems CMake (?) project cannot configure it as written in VS's doc. The panel is blank for me. https://learn.microsoft.com/en-us/cpp/code-quality/quick-start-code-analysis-for-c-cpp?view=msvc-170

This fixes all the default warnings.

Mostly uninitialized variables. Initialize everything religiously.

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud