CPP: Fix %I length specifier.

This commit is contained in:
Geoffrey White
2019-04-15 16:07:26 +01:00
parent 98c3e1475e
commit ac277ad7ad
5 changed files with 6 additions and 10 deletions

View File

@@ -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' |

View File

@@ -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

View File

@@ -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' |

View File

@@ -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