Am 17.09.2019 um 20:39 schrieb Eli Zaretskii:
>> From: Hans-Bernhard Bröker <[email protected]>
>> Date: Tue, 17 Sep 2019 20:23:43 +0200
>> Using strncat() like that offers no benefit at all. So why even bother
>> with the extra verbiage of using the 'n' version?
>
> Some of the strncat calls in that file don't copy complete strings,
> though, and they still cause warnings.
I don't see any such exceptions from the rule here (now using GCC 9.2.0,
on MSys2+MinGW64).
I onlyl see the warning issued where the length argument to strncat() is
a variation of strlen(src).
All but one are string literals with their strlen()s spelled out as
constants. The remaining one is just a trivial variation of pattern
using a variable string:
size_t length = strlen (ptr);
strncat (*description, ptr, length);