Skip to content

Commit b4fb98d

Browse files
committed
CPP: Fix comments.
1 parent 821d506 commit b4fb98d

File tree

4 files changed

+8
-8
lines changed
  • cpp/ql/test/query-tests/Likely Bugs/Format
    • NonConstantFormat
    • WrongTypeFormatArguments/Linux_signed_chars

4 files changed

+8
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ void test_custom_printf1()
1414
{
1515
myMultiplyDefinedPrintf("string", getString()); // GOOD
1616
myMultiplyDefinedPrintf(getString(), "string"); // BAD [NOT DETECTED]
17-
myMultiplyDefinedPrintf2("string", getString()); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
18-
myMultiplyDefinedPrintf2(getString(), "string"); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
17+
myMultiplyDefinedPrintf2("string", getString()); // GOOD (we can't tell which declaration is correct so we have to assume this is OK)
18+
myMultiplyDefinedPrintf2(getString(), "string"); // GOOD (we can't tell which declaration is correct so we have to assume this is OK)
1919
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ void test_custom_printf2(char *string)
1111
{
1212
myMultiplyDefinedPrintf("string", getString()); // GOOD
1313
myMultiplyDefinedPrintf(getString(), "string"); // BAD [NOT DETECTED]
14-
myMultiplyDefinedPrintf2("string", getString()); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
15-
myMultiplyDefinedPrintf2(getString(), "string"); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
14+
myMultiplyDefinedPrintf2("string", getString()); // GOOD (we can't tell which declaration is correct so we have to assume this is OK)
15+
myMultiplyDefinedPrintf2(getString(), "string"); // GOOD (we can't tell which declaration is correct so we have to assume this is OK)
1616
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ void test_custom_printf1()
1111
{
1212
myMultiplyDefinedPrintf("%i", "%f", 1); // GOOD
1313
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)
14+
myMultiplyDefinedPrintf2("%i", "%f", 1); // GOOD (we can't tell which declaration is correct so we have to assume this is OK)
15+
myMultiplyDefinedPrintf2("%i", "%f", 1.0f); // GOOD (we can't tell which declaration is correct so we have to assume this is OK)
1616
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ void test_custom_printf2()
99
{
1010
myMultiplyDefinedPrintf("%i", "%f", 1); // GOOD
1111
myMultiplyDefinedPrintf("%i", "%f", 1.0f); // BAD [NOT DETECTED]
12-
myMultiplyDefinedPrintf2("%i", "%f", 1); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
13-
myMultiplyDefinedPrintf2("%i", "%f", 1.0f); // GOOD (we can't tell which definition is correct so we have to assume this is OK)
12+
myMultiplyDefinedPrintf2("%i", "%f", 1); // GOOD (we can't tell which declaration is correct so we have to assume this is OK)
13+
myMultiplyDefinedPrintf2("%i", "%f", 1.0f); // GOOD (we can't tell which declaration is correct so we have to assume this is OK)
1414
}

0 commit comments

Comments
 (0)