-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some errors found by PVS-Studio tool #24014
Comments
Hi Andrey! Thanks a ton for your work, I am sure community will have fun squashing these bugs! |
Error 7 looked familiar, it was already fixed by me: dc2e734#diff-33050a8c8ed21f4806d591c06f251d48R776 What version of Godot was this analysis run on? The date says today, but the code it's looking at must be at least 40 days out of date. |
Out of these errors, #10 is in some code that shifts array elements to the right, thus the for cycle should most likely be like this:
Please verify. |
Yes, it has been a while since the code check. I've been checking projects to find interesting material for a conference, then I was getting ready with a report and presented it. Only after that I took up the article. However, the outcome is quite favorable :). This confirms once again the idea that the analyzer should be applied regularly. P.S. I suggest to go beyond the article and perform the analysis yourself. We're willing to provide a license for a month. |
Regarding the remaining errors:
|
@akien-mga In regards to error 19 (here's the patch I used, if you need it: error-19-testing.txt):
(64-bit version generates the same output) |
Fixes items 10, 16 and 19 from PVS-Studio blog post in godotengine#24014.
Fixes items 10, 16 and 19 from PVS-Studio blog post in godotengine#24014.
When preparing for the game developers conference, I thought it would be a good idea to get new examples of some interesting bugs detected by PVS-Studio. For that purpose, I checked a number of game engines including Godot. I failed to find any particularly interesting cases for my lecture, but I did feel the urge to write an article about ordinary defects: https://www.viva64.com/en/b/0594/
I hope it will help to fix some bugs.
The text was updated successfully, but these errors were encountered: