Skip to content

Fix V3041, V3064 warnings from PVS-Studio Static Analyzer #3

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

Merged
merged 2 commits into from
Nov 1, 2017
Merged

Fix V3041, V3064 warnings from PVS-Studio Static Analyzer #3

merged 2 commits into from
Nov 1, 2017

Conversation

AdmAlexus
Copy link
Contributor

Hello. I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio.

About your warnings: V3041, V3064.

Warnings with High priority:

V3041 The expression was implicitly cast from 'int' type to 'double' type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A = (double)(X) / Y;. KnackSackProblems.cs 63

Warnings with Low priority:

V3064 Potential division by zero. Consider inspecting denominator 'bucketSize'. BucketSort.cs 31

@justcoding121 justcoding121 merged commit 869bfcf into justcoding121:develop Nov 1, 2017
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

Successfully merging this pull request may close these issues.

2 participants