C++: Accept test changes.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-01-29 16:24:44 +00:00
parent ebd1595fbe
commit ea79a84c2e
3 changed files with 2 additions and 2 deletions

View File

@@ -3,4 +3,3 @@
| test.cpp:204:7:204:11 | call to scanf | The result of scanf is only checked against 0, but it can also return EOF. |
| test.cpp:436:7:436:11 | call to scanf | The result of scanf is only checked against 0, but it can also return EOF. |
| test.cpp:443:11:443:15 | call to scanf | The result of scanf is only checked against 0, but it can also return EOF. |
| test.cpp:467:8:467:12 | call to scanf | The result of scanf is only checked against 0, but it can also return EOF. |

View File

@@ -15,3 +15,4 @@
| test.cpp:416:7:416:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:413:7:413:11 | call to scanf | call to scanf |
| test.cpp:423:7:423:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:420:7:420:11 | call to scanf | call to scanf |
| test.cpp:460:6:460:10 | value | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:455:12:455:17 | call to sscanf | call to sscanf |
| test.cpp:474:6:474:10 | value | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:467:8:467:12 | call to scanf | call to scanf |

View File

@@ -464,7 +464,7 @@ void check_for_negative_test() {
int res;
int value;
res = scanf("%d", &value); // GOOD [FALSE POSITIVE]
res = scanf("%d", &value); // GOOD
if(res == 0) {
return;
}