[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [platform-testers] texinfo-6.6.90 pretest
From: |
Hans-Bernhard Bröker |
Subject: |
Re: [platform-testers] texinfo-6.6.90 pretest |
Date: |
Tue, 17 Sep 2019 21:49:08 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
Am 17.09.2019 um 20:39 schrieb Eli Zaretskii:
>> From: Hans-Bernhard Bröker <address@hidden>
>> 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);