Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Mike Stump
On Nov 10, 2017, at 12:36 PM, Martin Sebor wrote: > > The warning is included in -Wall Ah, I missed that little detail the first time around. -Wall is special in that we already just sanitize the source to pass it. I assumed it was a non-wall flag someone added or wanted

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Martin Sebor
On 11/10/2017 03:18 PM, Jeff Law wrote: On 11/10/2017 12:55 PM, Martin Sebor wrote: A few not incorrect but not strictly intended (according to the function's original purpose) uses of strncpy trigger the new -Wstringop-truncation warning because they temporarily leave the copied string without

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Jeff Law
On 11/10/2017 12:55 PM, Martin Sebor wrote: > A few not incorrect but not strictly intended (according to > the function's original purpose) uses of strncpy trigger the > new -Wstringop-truncation warning because they temporarily > leave the copied string without a terminating nul. > > The 

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Martin Sebor
On 11/10/2017 01:13 PM, Mike Stump wrote: On Nov 10, 2017, at 11:55 AM, Martin Sebor wrote: A few not incorrect but not strictly intended (according to the function's original purpose) uses of strncpy trigger the new -Wstringop-truncation warning because they temporarily

Re: [PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Mike Stump
On Nov 10, 2017, at 11:55 AM, Martin Sebor wrote: > A few not incorrect but not strictly intended (according to > the function's original purpose) uses of strncpy trigger the > new -Wstringop-truncation warning because they temporarily > leave the copied string without a

[PATCH] avoid -Wstringop-truncation in Darwin bootstrap

2017-11-10 Thread Martin Sebor
A few not incorrect but not strictly intended (according to the function's original purpose) uses of strncpy trigger the new -Wstringop-truncation warning because they temporarily leave the copied string without a terminating nul. The attached patch replaces these uses with memcpy to avoid the