Není to chyba, C všechny výrazy s typem menším než int konvertuje na int. V printf tedy můžeme uvést "%d" a jako typ můžeme uvést něco menšího než int, ono se to na int zkonvertuje stejně při předání do funkce printf.
Chyba v předávání parametrů by to byla pouze v případě, že by int bylo menší než uint16_t (taková implementace C však ani neexistuje).
Protože něco neexistuje, tak budeme předpokládat, že to nikdy nenastane, blahblahblah
Právě kvůli takovým, jako jste vy, vznikají nepřenositelné programy.
> C všechny výrazy s typem menším než int konvertuje na int.
To je mi novinka, pokud mi ji dokážete (např. nějakým výtažkem ze standardu (nejlépe C99)), tak se prohlásím za blba.
C99, 6.3.1.1.2
The following may be used in an expression wherever an int or unsigned int may be used:
-- An object or expression with an integer type whose integer conversion rank is less than the rank of int and unsigned int.
-- A bit-field of type _Bool, int, signed int, or unsigned int.
If an int can represent all values of the original type, the value is converted to an int; otherwise, it is converted to an unsigned int. These are called the integer promotions. All other types are unchanged by the integer promotions.