mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
CPP: Fix %I length specifier.
This commit is contained in:
@@ -21,8 +21,6 @@
|
||||
| printf1.h:130:18:130:18 | 0 | This argument should be of type 'void *' but is of type 'int' |
|
||||
| printf1.h:153:18:153:18 | c | This argument should be of type '__wchar_t *' but is of type 'char *' |
|
||||
| printf1.h:156:18:156:19 | wc | This argument should be of type 'char *' but is of type '__wchar_t *' |
|
||||
| printf1.h:174:19:174:21 | pdt | This argument should be of type 'int' but is of type 'long long' |
|
||||
| printf1.h:175:19:175:20 | sz | This argument should be of type 'unsigned int' but is of type 'unsigned long long' |
|
||||
| printf1.h:181:21:181:22 | ll | This argument should be of type 'int' but is of type 'long long' |
|
||||
| printf1.h:182:21:182:23 | ull | This argument should be of type 'unsigned int' but is of type 'unsigned long long' |
|
||||
| printf1.h:185:21:185:23 | i64 | This argument should be of type 'int' but is of type 'long long' |
|
||||
|
||||
@@ -171,8 +171,8 @@ void fun4()
|
||||
__int64 i64;
|
||||
unsigned __int64 u64;
|
||||
|
||||
printf("%Ii\n", pdt); // GOOD [FALSE POSITIVE]
|
||||
printf("%Iu\n", sz); // GOOD [FALSE POSITIVE]
|
||||
printf("%Ii\n", pdt); // GOOD
|
||||
printf("%Iu\n", sz); // GOOD
|
||||
|
||||
printf("%I32i\n", i); // GOOD
|
||||
printf("%I32u\n", ui); // GOOD
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
| printf1.h:75:19:75:28 | sizeof(<expr>) | This argument should be of type 'ssize_t' but is of type 'unsigned long long' |
|
||||
| printf1.h:84:23:84:35 | ... - ... | This argument should be of type 'ssize_t' but is of type 'long long' |
|
||||
| printf1.h:130:18:130:18 | 0 | This argument should be of type 'void *' but is of type 'int' |
|
||||
| printf1.h:148:19:148:21 | pdt | This argument should be of type 'int' but is of type 'long long' |
|
||||
| printf1.h:149:19:149:20 | sz | This argument should be of type 'unsigned int' but is of type 'unsigned long long' |
|
||||
| printf1.h:155:21:155:22 | ll | This argument should be of type 'int' but is of type 'long long' |
|
||||
| printf1.h:156:21:156:23 | ull | This argument should be of type 'unsigned int' but is of type 'unsigned long long' |
|
||||
| printf1.h:159:21:159:23 | i64 | This argument should be of type 'int' but is of type 'long long' |
|
||||
|
||||
@@ -145,8 +145,8 @@ void fun4()
|
||||
__int64 i64;
|
||||
unsigned __int64 u64;
|
||||
|
||||
printf("%Ii\n", pdt); // GOOD [FALSE POSITIVE]
|
||||
printf("%Iu\n", sz); // GOOD [FALSE POSITIVE]
|
||||
printf("%Ii\n", pdt); // GOOD
|
||||
printf("%Iu\n", sz); // GOOD
|
||||
|
||||
printf("%I32i\n", i); // GOOD
|
||||
printf("%I32u\n", ui); // GOOD
|
||||
|
||||
Reference in New Issue
Block a user