Skip to content

Commit 040bd89

Browse files
committed
CPP: Correct expected results.
1 parent 9100ab9 commit 040bd89

File tree

3 files changed

+3
-3
lines changed
  • cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ void test_custom_printf1()
1414
myMultiplyDefinedPrintf("%i", 0, 1, 2); // BAD (too many format arguments)
1515
myMultiplyDefinedPrintf2("%i", 0); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
1616
myMultiplyDefinedPrintf2("%i", 0, 1); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
17-
myMultiplyDefinedPrintf2("%i", 0, 1, 2); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
17+
myMultiplyDefinedPrintf2("%i", 0, 1, 2); // BAD (too many format arguments regardless of which definition is correct) [NOT DETECTED]
1818
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ void test_custom_printf2()
1111
myMultiplyDefinedPrintf("%i", 0, 1, 2); // BAD (too many format arguments)
1212
myMultiplyDefinedPrintf2("%i", 0); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
1313
myMultiplyDefinedPrintf2("%i", 0, 1); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
14-
myMultiplyDefinedPrintf2("%i", 0, 1, 2); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
14+
myMultiplyDefinedPrintf2("%i", 0, 1, 2); // BAD (too many format arguments regardless of which definition is correct) [NOT DETECTED]
1515
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ void test_custom_printf2()
77
myMultiplyDefinedPrintf("%i", 0, 1, 2); // BAD (too many format arguments)
88
myMultiplyDefinedPrintf2("%i", 0); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
99
myMultiplyDefinedPrintf2("%i", 0, 1); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
10-
myMultiplyDefinedPrintf2("%i", 0, 1, 2); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
10+
myMultiplyDefinedPrintf2("%i", 0, 1, 2); // BAD (too many format arguments regardless of which definition is correct) [NOT DETECTED]
1111
}

0 commit comments

Comments
 (0)