Re: [Xen-devel] [PATCH v3] tools: fix several "format-truncation" warnings with GCC 7

2017-06-20 Thread Julien Grall
On 06/20/2017 12:02 PM, Wei Liu wrote: On Tue, Jun 20, 2017 at 11:58:53AM +0100, Julien Grall wrote: Hi Wei, On 06/19/2017 12:39 PM, Wei Liu wrote: On Wed, Jun 14, 2017 at 09:11:48AM +0800, Zhongze Liu wrote: GCC 7.1.1 complains that several buffers passed to snprintf() in xenpmd and

Re: [Xen-devel] [PATCH v3] tools: fix several "format-truncation" warnings with GCC 7

2017-06-20 Thread Wei Liu
On Tue, Jun 20, 2017 at 11:58:53AM +0100, Julien Grall wrote: > Hi Wei, > > On 06/19/2017 12:39 PM, Wei Liu wrote: > > On Wed, Jun 14, 2017 at 09:11:48AM +0800, Zhongze Liu wrote: > > > GCC 7.1.1 complains that several buffers passed to snprintf() in xenpmd > > > and tools/ocmal/xc are too small

Re: [Xen-devel] [PATCH v3] tools: fix several "format-truncation" warnings with GCC 7

2017-06-20 Thread Julien Grall
Hi Wei, On 06/19/2017 12:39 PM, Wei Liu wrote: On Wed, Jun 14, 2017 at 09:11:48AM +0800, Zhongze Liu wrote: GCC 7.1.1 complains that several buffers passed to snprintf() in xenpmd and tools/ocmal/xc are too small to hold the largest possible resulting string, which is calculated by adding up

Re: [Xen-devel] [PATCH v3] tools: fix several "format-truncation" warnings with GCC 7

2017-06-19 Thread Wei Liu
On Wed, Jun 14, 2017 at 09:11:48AM +0800, Zhongze Liu wrote: > GCC 7.1.1 complains that several buffers passed to snprintf() in xenpmd > and tools/ocmal/xc are too small to hold the largest possible resulting > string, > which is calculated by adding up the maximum length of all the substrings. >

[Xen-devel] [PATCH v3] tools: fix several "format-truncation" warnings with GCC 7

2017-06-13 Thread Zhongze Liu
GCC 7.1.1 complains that several buffers passed to snprintf() in xenpmd and tools/ocmal/xc are too small to hold the largest possible resulting string, which is calculated by adding up the maximum length of all the substrings. The warnings are treated as errors by -Werror, and goes like this