Use the format specifier of the largest possible type and cast the value to the chosen type. This avoids compiler warnings on x86_64.