Re: [PATCH] tools/libs/stat: fix broken build

2020-09-11 Thread Andrew Cooper
On 11/09/2020 18:58, Wei Liu wrote: > On Fri, Sep 11, 2020 at 03:15:28PM +0200, Juergen Gross wrote: >> Making getBridge() static triggered a build error with some gcc versions: >> >> error: 'strncpy' output may be truncated copying 15 bytes from a string of >> length 255 [-Werror=stringop-truncati

Re: [PATCH] tools/libs/stat: fix broken build

2020-09-11 Thread Wei Liu
On Fri, Sep 11, 2020 at 03:15:28PM +0200, Juergen Gross wrote: > Making getBridge() static triggered a build error with some gcc versions: > > error: 'strncpy' output may be truncated copying 15 bytes from a string of > length 255 [-Werror=stringop-truncation] > > Fix that by printing a sane erro

[PATCH] tools/libs/stat: fix broken build

2020-09-11 Thread Juergen Gross
Making getBridge() static triggered a build error with some gcc versions: error: 'strncpy' output may be truncated copying 15 bytes from a string of length 255 [-Werror=stringop-truncation] Fix that by printing a sane error message and bailing out in case the name of a bridge is too long. Fixes: