Commit 2eb35fc
committed
Fix Clang's -Wformat warnings
Use the %u format specifier with uint32_t arguments.
Cast an enum type to int and use the %d format specifier with it. The
underlying type of an enum type is implementation-defined. GCC uses
unsigned int whenever possible, whereas MSVC always uses int. So there
is no portable format specifier for an enum type. Since all enum
constants have the int type (this is not implementation-defined), it is
safe to cast an enum type to int and use the %d format specifier with
it.1 parent d486dad commit 2eb35fc
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2877 | 2877 | | |
2878 | 2878 | | |
2879 | 2879 | | |
2880 | | - | |
| 2880 | + | |
2881 | 2881 | | |
2882 | 2882 | | |
2883 | 2883 | | |
| |||
3385 | 3385 | | |
3386 | 3386 | | |
3387 | 3387 | | |
3388 | | - | |
| 3388 | + | |
3389 | 3389 | | |
3390 | 3390 | | |
3391 | 3391 | | |
| |||
5367 | 5367 | | |
5368 | 5368 | | |
5369 | 5369 | | |
5370 | | - | |
| 5370 | + | |
5371 | 5371 | | |
5372 | 5372 | | |
5373 | 5373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
1008 | | - | |
| 1008 | + | |
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
| |||
1467 | 1467 | | |
1468 | 1468 | | |
1469 | 1469 | | |
1470 | | - | |
| 1470 | + | |
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
| |||
1498 | 1498 | | |
1499 | 1499 | | |
1500 | 1500 | | |
1501 | | - | |
| 1501 | + | |
1502 | 1502 | | |
1503 | 1503 | | |
1504 | 1504 | | |
| |||
0 commit comments