Re: [PATCH 2/2] gcc8.1: fix strcat warning

2018-06-16 Thread Andy Green
On 06/17/2018 05:52 AM, Christian Hesse wrote: John Keeping on Sat, 2018/06/16 14:11: On Wed, Jun 13, 2018 at 07:34:07AM +0800, Andy Green wrote: ../ui-ssdiff.c: In function ‘replace_tabs’: ../ui-ssdiff.c:142:4: warning: ‘strncat’ output truncated copying between 1 and 8 bytes from a string

Re: [PATCH 2/2] gcc8.1: fix strcat warning

2018-06-16 Thread Christian Hesse
John Keeping on Sat, 2018/06/16 14:11: > On Wed, Jun 13, 2018 at 07:34:07AM +0800, Andy Green wrote: > > ../ui-ssdiff.c: In function ‘replace_tabs’: > > ../ui-ssdiff.c:142:4: warning: ‘strncat’ output truncated copying between > > 1 and 8 bytes from a string of length 8 [-Wstringop-truncation] >

Re: [PATCH 2/2] gcc8.1: fix strcat warning

2018-06-16 Thread John Keeping
On Wed, Jun 13, 2018 at 07:34:07AM +0800, Andy Green wrote: > ../ui-ssdiff.c: In function ‘replace_tabs’: > ../ui-ssdiff.c:142:4: warning: ‘strncat’ output truncated copying between 1 > and 8 bytes from a string of length 8 [-Wstringop-truncation] > strncat(result, spaces, 8 - (strlen(result)

[PATCH 2/2] gcc8.1: fix strcat warning

2018-06-12 Thread Andy Green
../ui-ssdiff.c: In function ‘replace_tabs’: ../ui-ssdiff.c:142:4: warning: ‘strncat’ output truncated copying between 1 and 8 bytes from a string of length 8 [-Wstringop-truncation] strncat(result, spaces, 8 - (strlen(result) % 8)); ^