Re: [-Wstringop-overflow=] strncat(3)

2022-12-15 Thread Alejandro Colomar
Hi Martin, On 12/15/22 21:50, Martin Sebor wrote: On 12/14/22 16:14, Alejandro Colomar via Libc-alpha wrote: [...]    int    main(void)    {    char    buf[BUFSIZ];    size_t  len;    buf[0] = '\0';  // There’s no ’cpy’ function to

Re: [-Wstringop-overflow=] strncat(3)

2022-12-15 Thread Martin Sebor
On 12/14/22 16:14, Alejandro Colomar via Libc-alpha wrote: [CC += groff] Hi Andrew, On 12/14/22 23:57, Andrew Pinski wrote: On Wed, Dec 14, 2022 at 2:46 PM Alejandro Colomar via Libc-alpha wrote: Hi, I was rewriting the strncat(3) manual page, and when I tried to compile the example prog

Re: [-Wstringop-overflow=] strncat(3)

2022-12-14 Thread Alejandro Colomar
[CC += groff] Hi Andrew, On 12/14/22 23:57, Andrew Pinski wrote: On Wed, Dec 14, 2022 at 2:46 PM Alejandro Colomar via Libc-alpha wrote: Hi, I was rewriting the strncat(3) manual page, and when I tried to compile the example program, I got a surprise from the compiler. Here goes the page: