From: RongQing Li <roy.qing.li@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: fix array index in ip6_mc_add_src()
Date: Mon, 2 Apr 2012 18:16:14 +0800 [thread overview]
Message-ID: <CAJFZqHwAFao9En4LRBST3YSufbrjbtsV09_h9fOVTSsCHtsT_w@mail.gmail.com> (raw)
In-Reply-To: <20120401.151318.984514868716173152.davem@davemloft.net>
2012/4/2 David Miller <davem@davemloft.net>:
> From: roy.qing.li@gmail.com
> Date: Sun, 1 Apr 2012 16:45:26 +0800
>
>> From: RongQing.Li <roy.qing.li@gmail.com>
>>
>> Convert array index from the loop bound to the loop index.
>>
>> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
>
> That's not all you are doing:
>
>> - (void) ip6_mc_del1_src(pmc, sfmode, &psfsrc[i]);
>> + ip6_mc_del1_src(pmc, sfmode, &psfsrc[j]);
>
> You absolutely MUST mention and explain this (void) removal.
> It's probably there to elide an unchecked return value
> warning from the compiler.
since ip6_mc_del1_src() does not use __must_check likely attribute.
I try to compile with several gcc warning options, but do not
find which options can report the unchecked return value.
Maybe other tools will complain the unchecked return value.
So I will keep the void.
-R
next prev parent reply other threads:[~2012-04-02 10:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-01 8:45 [PATCH] ipv6: fix array index in ip6_mc_add_src() roy.qing.li
2012-04-01 19:13 ` David Miller
2012-04-02 10:16 ` RongQing Li [this message]
2012-04-02 20:19 ` David Miller
2012-04-03 0:58 ` RongQing Li
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=CAJFZqHwAFao9En4LRBST3YSufbrjbtsV09_h9fOVTSsCHtsT_w@mail.gmail.com \
--to=roy.qing.li@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).