On 25.11.2025 06:46, Bertrand Drouvot wrote:
> I think that the variadic calls in the patch are related to functions that
> can benefits from -Wformat. Let's focus on those: with the cast one would need
> to verify 3 things: variable type, cast and format specifier.
> Without the cast then only 2 things and the compiler can verify these match via
> -Wformat warnings.
>
> With the cast, the compiler only checks that the cast result matches the format,
> not whether the cast itself is correct, so I'm in favor of removing the cast,
> thoughts?
>
I agree. It's better if we only have the casts in places where we
actually want to change the type before printing.
Another benefit is that one can directly deduct the type from the log /
print statement by looking at the format specifier.
--
David Geier