mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
C++: Improve isGuarded.
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
| test.cpp:137:6:137:14 | ... > ... | Unsigned subtraction can never be negative. |
|
||||
| test.cpp:146:7:146:15 | ... > ... | Unsigned subtraction can never be negative. |
|
||||
| test.cpp:152:7:152:15 | ... > ... | Unsigned subtraction can never be negative. |
|
||||
| test.cpp:156:7:156:15 | ... > ... | Unsigned subtraction can never be negative. |
|
||||
| test.cpp:169:6:169:14 | ... > ... | Unsigned subtraction can never be negative. |
|
||||
| test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. |
|
||||
| test.cpp:195:6:195:14 | ... > ... | Unsigned subtraction can never be negative. |
|
||||
| test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. |
|
||||
|
||||
@@ -153,7 +153,7 @@ void test8() {
|
||||
// ...
|
||||
}
|
||||
} else {
|
||||
if (a - b > 0) { // GOOD (as a > b) [FALSE POSITIVE]
|
||||
if (a - b > 0) { // GOOD (as a > b)
|
||||
// ...
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void test8() {
|
||||
|
||||
if (a < b) return;
|
||||
|
||||
if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE]
|
||||
if (a - b > 0) { // GOOD (as a >= b)
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user