Skip to content

Conversation

@chuckaude
Copy link

No description provided.

if (a!=0) {
//Do something
}
int y = b / a;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Comment From coverity

Coverity Issue - Division or modulo by zero

Medium CWE-369
In expression "b / a", division by expression "a" which may be zero results in an exception.

The program will raise an exception.

if (a!=0) {
//Do something
}
int y = b / a;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Comment From coverity

Coverity Issue - DLS: Dead local store

Low CWE-563
Dead store to y.

@chuckaude chuckaude closed this Dec 16, 2024
@chuckaude chuckaude deleted the chuckaude-patch-5 branch December 16, 2024 21:56
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