mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
CPP: Modify violation message of NonPortablePrintf.ql for consistency with WrongTypeFormatArguments.ql.
This commit is contained in:
@@ -84,5 +84,5 @@ where (
|
||||
and not arg.isAffectedByMacro()
|
||||
and size32 = ilp32.paddedSize(actual) and size64 = lp64.paddedSize(actual)
|
||||
and size64 != size32
|
||||
select arg, "This argument should be of type "+expected.getName()+" but is of type "+actual.getName() +
|
||||
" (which changes size from " + size32 + " to " + size64 + " on 64-bit systems)."
|
||||
select arg, "This argument should be of type '" + expected.getName() + "' but is of type '" + actual.getName() +
|
||||
"' (which changes size from " + size32 + " to " + size64 + " on 64-bit systems)."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| test.cpp:10:17:10:17 | l | This argument should be of type int but is of type long (which changes size from 32 to 64 on 64-bit systems). |
|
||||
| test.cpp:13:17:13:19 | ptr | This argument should be of type int but is of type void * (which changes size from 32 to 64 on 64-bit systems). |
|
||||
| test.cpp:14:17:14:19 | ptr | This argument should be of type unsigned int but is of type void * (which changes size from 32 to 64 on 64-bit systems). |
|
||||
| test.cpp:15:17:15:19 | ptr | This argument should be of type unsigned int but is of type void * (which changes size from 32 to 64 on 64-bit systems). |
|
||||
| test.cpp:10:17:10:17 | l | This argument should be of type 'int' but is of type 'long' (which changes size from 32 to 64 on 64-bit systems). |
|
||||
| test.cpp:13:17:13:19 | ptr | This argument should be of type 'int' but is of type 'void *' (which changes size from 32 to 64 on 64-bit systems). |
|
||||
| test.cpp:14:17:14:19 | ptr | This argument should be of type 'unsigned int' but is of type 'void *' (which changes size from 32 to 64 on 64-bit systems). |
|
||||
| test.cpp:15:17:15:19 | ptr | This argument should be of type 'unsigned int' but is of type 'void *' (which changes size from 32 to 64 on 64-bit systems). |
|
||||
|
||||
Reference in New Issue
Block a user