Re: [PATCH iproute2/net-next] ss: initialise variables outside of for loop

2016-12-03 Thread Simon Horman
On Fri, Dec 02, 2016 at 02:18:17PM -0800, Stephen Hemminger wrote: > On Fri, 2 Dec 2016 12:56:05 +0100 > Simon Horman wrote: > > > Initialise for loops outside of for loops. GCC flags this as being > > out of spec unless C99 or C11 mode is used. > > > > With this

Re: [PATCH iproute2/net-next] ss: initialise variables outside of for loop

2016-12-02 Thread Stephen Hemminger
On Fri, 2 Dec 2016 12:56:05 +0100 Simon Horman wrote: > Initialise for loops outside of for loops. GCC flags this as being > out of spec unless C99 or C11 mode is used. > > With this change the entire tree appears to compile cleanly with -Wall. > > $ gcc --version

[PATCH iproute2/net-next] ss: initialise variables outside of for loop

2016-12-02 Thread Simon Horman
Initialise for loops outside of for loops. GCC flags this as being out of spec unless C99 or C11 mode is used. With this change the entire tree appears to compile cleanly with -Wall. $ gcc --version gcc (Debian 4.9.2-10) 4.9.2 ... $ make ... ss.c: In function ‘unix_show_sock’: ss.c:3128:4: