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

From: Ilya Dryomov
Date: Tue Nov 15 2016 - 08:08:02 EST


On Tue, Nov 15, 2016 at 11:38 AM, David Binderman <dcb314@xxxxxxxxxxx> 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