File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
cpp/ql/test/query-tests/Likely Bugs/Format
WrongTypeFormatArguments/Linux_signed_chars Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments