Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e74721e

Browse files
committed
CPP: Test fixes as a result of changes.
1 parent 6e5207c commit e74721e

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/TooManyFormatArguments.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
| custom_printf.cpp:31:5:31:12 | call to myPrintf | Format expects 2 arguments but given 3 |
2-
| custom_printf.cpp:44:2:44:7 | call to printf | Format expects 0 arguments but given 2 |
32
| macros.cpp:12:2:12:31 | call to printf | Format expects 2 arguments but given 3 |
43
| macros.cpp:16:2:16:30 | call to printf | Format expects 2 arguments but given 3 |
54
| test.c:7:2:7:7 | call to printf | Format expects 0 arguments but given 1 |

cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
| custom_printf.cpp:29:5:29:12 | call to myPrintf | Format expects 2 arguments but given 1 |
2-
| custom_printf.cpp:45:2:45:7 | call to printf | Format expects 2 arguments but given 0 |
32
| macros.cpp:14:2:14:37 | call to printf | Format expects 4 arguments but given 3 |
43
| macros.cpp:21:2:21:36 | call to printf | Format expects 4 arguments but given 3 |
54
| test.c:9:2:9:7 | call to printf | Format expects 1 arguments but given 0 |

cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/custom_printf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ void test_custom_printf2()
4141
{
4242
// notTheFormat format ...
4343
printf(0, "%i %i", 100, 200); // GOOD
44-
printf("", "%i %i", 100, 200); // GOOD [FALSE POSITIVE]
45-
printf("%i %i", "" ); // GOOD [FALSE POSITIVE]
44+
printf("", "%i %i", 100, 200); // GOOD
45+
printf("%i %i", "" ); // GOOD
4646
}

0 commit comments

Comments
 (0)