On Aug 19 2019, Bruno Haible <[email protected]> wrote:

> Eli Zaretskii wrote:
>> One other issue is that GCC 8 flags many uses of strncat in
>> install-info.c as unsafe:
>> 
>>      install-info.c: In function 'split_entry':
>>      install-info.c:1624:17: warning: 'strncat' specified bound 2 equals 
>> source length [-Wstringop-overflow=]
>>                       strncat (*description, "  ", 2);
>>                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 
>
> The warnings are clearly pointless, because the amount of memory
> allocated for *description is unknown to the compiler.

It's not about the size of *description, but the length of "  ", making
it equivalent to strcat.

Andreas.

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Reply via email to