From: Stephen Hemminger <stephen@networkplumber•org>
To: Simon Horman <simon.horman@netronome•com>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH iproute2/net-next] ss: initialise variables outside of for loop
Date: Fri, 2 Dec 2016 14:18:17 -0800 [thread overview]
Message-ID: <20161202141817.7341a497@xeon-e3> (raw)
In-Reply-To: <1480679765-9014-1-git-send-email-simon.horman@netronome.com>
On Fri, 2 Dec 2016 12:56:05 +0100
Simon Horman <simon.horman@netronome•com> 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
> gcc (Debian 4.9.2-10) 4.9.2
> ...
> $ make
> ...
> ss.c: In function ‘unix_show_sock’:
> ss.c:3128:4: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
> ...
>
> Signed-off-by: Simon Horman <simon.horman@netronome•com>
Applied.
Note, I used to have -Wall in Makefile but old GCC were broken and would give
aliasing warnings.
next prev parent reply other threads:[~2016-12-02 22:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 11:56 [PATCH iproute2/net-next] ss: initialise variables outside of for loop Simon Horman
2016-12-02 22:18 ` Stephen Hemminger [this message]
2016-12-03 8:37 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161202141817.7341a497@xeon-e3 \
--to=stephen@networkplumber$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=simon.horman@netronome$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox