C++: Add FP test.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-01-29 16:16:16 +00:00
parent aeae208dc3
commit 7e29141196
2 changed files with 15 additions and 0 deletions

View File

@@ -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);
}