format-truncation
Jonathan Wakely
jwakely.gcc@gmail.com
Thu Feb 14 11:08:00 GMT 2019
On Thu, 14 Feb 2019 at 10:52, Kalamatee <kalamatee@gmail.com> wrote:
>
> it is used by acpica to implement snprintf and sprint -:
>
> https://github.com/acpica/acpica/blob/master/source/components/utilities/utprint.c
>
> see line 837.
>
> Clearly Format and Args aren't known at compile time, however the invocation is correct and valid so I don't get why the incorrect warning is shown.
>
> (I could understand a message similar to other -format ones that suggest the operation may overflow the buffer - but that's not what the diagnostic says, it implies the second parameter cant be over INT_MAX).
It doesn't say it can't be over INT_MAX, it just warns you that it is
over INT_MAX (because that means no checking on the output length).
More information about the Gcc-help
mailing list