[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150625085423.07729480@uryu.home.lan>
Date: Thu, 25 Jun 2015 08:54:23 -0400
From: Stephen Hemminger <shemming@...cade.com>
To: Maciej Żenczykowski <zenczykowski@...il.com>
CC: Maciej Żenczykowski <maze@...gle.com>,
Eric Dumazet <edumazet@...gle.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/2] iproute2: tc/m_pedit.c - remove dead code
On Thu, 25 Jun 2015 02:03:02 -0700
Maciej Żenczykowski <zenczykowski@...il.com> wrote:
> From: Maciej Żenczykowski <maze@...gle.com>
>
> The initializers are simply not needed.
>
> These if-blocks are outright dead code, because '0 > unsigned' is always
> false, so only else clause triggers and regardless of which clause triggers
> it only updates 'ind' which is later unconditionally written to before
> being used anyway.
>
> Otherwise we get errors from clang:
>
> m_pedit.c:166:8: error: comparison of 0 > unsigned expression is always false [-Werror,-Wtautological-compare]
> if (0 > tkey->off) {
> ~ ^ ~~~~~~~~~
> m_pedit.c:209:8: error: comparison of 0 > unsigned expression is always false [-Werror,-Wtautological-compare]
> if (0 > tkey->off) {
> ~ ^ ~~~~~~~~~
> 2 errors generated.
>
> Change-Id: I3c9e9092915088fc56f992e5df736851541a4458
> ---
> tc/m_pedit.c | 32 ++++++++------------------------
> 1 file changed, 8 insertions(+), 24 deletions(-)
Both applied
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists