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

Skip to content

Commit 821d506

Browse files
committed
CPP: Correct the tests.
1 parent 73b55f0 commit 821d506

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • cpp/ql/test/query-tests/Likely Bugs/Format/WrongTypeFormatArguments/Linux_signed_chars

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ void myMultiplyDefinedPrintf2(const char *format, const char *extraArg, ...);
99

1010
void test_custom_printf1()
1111
{
12-
myMultiplyDefinedPrintf("%i", "%s", 1); // GOOD
13-
myMultiplyDefinedPrintf("%i", "%s", 1.0f); // BAD [NOT DETECTED]
14-
myMultiplyDefinedPrintf2("%i", "%s", 1); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
15-
myMultiplyDefinedPrintf2("%i", "%s", 1.0f); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
12+
myMultiplyDefinedPrintf("%i", "%f", 1); // GOOD
13+
myMultiplyDefinedPrintf("%i", "%f", 1.0f); // BAD [NOT DETECTED]
14+
myMultiplyDefinedPrintf2("%i", "%f", 1); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
15+
myMultiplyDefinedPrintf2("%i", "%f", 1.0f); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
1616
}

0 commit comments

Comments
 (0)