mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Merge pull request #374 from jbj/range-analysis-rounding
Approved by kevinbackhouse
This commit is contained in:
@@ -57,3 +57,12 @@ static int foo(size_t *size)
|
||||
if (*size <= MAX_VAL) // BAD (pointless comparison) [NO LONGER REPORTED]
|
||||
*size = MAX_VAL;
|
||||
}
|
||||
|
||||
// ODASA-7205
|
||||
int regression_test_01(unsigned long bb) {
|
||||
if (bb + 1 == 0) { // GOOD [NO LONGER REPORTED]
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user