Re: [Linuxptp-devel] [PATCH RFC 29/30] interface: Silence warning from gcc version 8.

2020-02-18 Thread Jacob Keller
On 2/11/2020 6:04 AM, Richard Cochran wrote: > When compiling with gcc8 and -O2, the clever compiler complains: > >interface.c: In function ‘interface_ensure_tslabel’: >interface.c:38:3: error: ‘strncpy’ output may be truncated copying 108 > bytes from a string of length 108

[Linuxptp-devel] [PATCH RFC 29/30] interface: Silence warning from gcc version 8.

2020-02-11 Thread Richard Cochran
When compiling with gcc8 and -O2, the clever compiler complains: interface.c: In function ‘interface_ensure_tslabel’: interface.c:38:3: error: ‘strncpy’ output may be truncated copying 108 bytes from a string of length 108 [-Werror=stringop-truncation] Even though this is a false