-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Example code:
void foo(int x) {
if (x==0) {}
x = 100 / x;
}
Example output from Cppcheck:
src/checkcommon.cpp:13:13: warning: Either the condition 'x==0' is redundant or there is division by zero at line 13. [zerodivcond]
x = 100 / x;
^
src/checkcommon.cpp:12:10: note: Assuming that condition 'x==0' is not redundant
if (x==0) {}
^
src/checkcommon.cpp:13:13: note: Division by zero
x = 100 / x;
^
In vscode the notes are reordered:

Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working