mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
C++: Add FP test.
This commit is contained in:
@@ -458,4 +458,18 @@ void disjunct_boolean_condition(const char* modifier_data) {
|
||||
return;
|
||||
}
|
||||
use(value); // GOOD
|
||||
}
|
||||
|
||||
void check_for_negative_test() {
|
||||
int res;
|
||||
int value;
|
||||
|
||||
res = scanf("%d", &value); // GOOD [FALSE POSITIVE]
|
||||
if(res == 0) {
|
||||
return;
|
||||
}
|
||||
if (res < 0) {
|
||||
return;
|
||||
}
|
||||
use(value);
|
||||
}
|
||||
Reference in New Issue
Block a user