Skip to content
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

Static source code analysis issues from cppcheck #459

Open
kungfooman opened this issue Jul 9, 2020 · 1 comment
Open

Static source code analysis issues from cppcheck #459

kungfooman opened this issue Jul 9, 2020 · 1 comment

Comments

@kungfooman
Copy link

I started to test around with cppcheck[1] and it detects quite some errors like these:

unknown

This depends on a compiler to initialize variables to 0 e.g.

unknown (1)

This can lead to bugs depending on the float representation of the architecture in memory e.g.

Should these issues be fixed?

[1] Download: http://cppcheck.sourceforge.net/

@Pan7
Copy link

Pan7 commented Jan 15, 2022

First Error:
An unsigned variable is an unsigned int.
There is uninitialized bytes returned that are problably never used.
How would a fix look like?
Turn unsigned i into an unsigned char[3] and cast it to unsigned?

I vote yes to fix these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants