Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1522659

Re: drivers/block/rbd.c:838: bad if expression ?

From Ilya Dryomov <idryomov@gmail.com>
Newsgroups linux.kernel
Subject Re: drivers/block/rbd.c:838: bad if expression ?
Date 2016-11-15 14:10 +0100
Message-ID <sDLES-5lG-27@gated-at.bofh.it> (permalink)
References <sDLES-5lG-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Nov 15, 2016 at 11:38 AM, David Binderman <dcb314@hotmail.com> wrote:
> Hello there,
>
> drivers/block/rbd.c:838:34: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op]
>
> Source code is
>
>    } else if (token > Opt_last_int && token < Opt_last_string) {
>
> but
>
> enum {
>     Opt_queue_depth,
>     Opt_last_int,
>     /* int args above */
>     Opt_last_string,

Hi David,

It's just a placeholder for any string options that might be added in
the future.  See opt_tokens definition in net/ceph/ceph_common.c for an
example (fsid, secret, etc).

Thanks,

                Ilya

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: drivers/block/rbd.c:838: bad if expression ? Ilya Dryomov <idryomov@gmail.com> - 2016-11-15 14:10 +0100

csiph-web