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


Groups > linux.kernel > #1618390

Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation

From Matthias Kaehlcke <mka@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mac80211: Fix clang warning about constant operand in logical operation
Date 2017-04-07 01:10 +0200
Message-ID <ttoHo-7pr-11@gated-at.bofh.it> (permalink)
References (1 earlier) <ttl6N-51d-1@gated-at.bofh.it> <ttlgu-54H-27@gated-at.bofh.it> <ttmYV-6fl-5@gated-at.bofh.it> <ttoo1-73j-5@gated-at.bofh.it> <ttoxH-76X-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


El Fri, Apr 07, 2017 at 12:51:57AM +0200 Johannes Berg ha dit:

> On Thu, 2017-04-06 at 15:42 -0700, Matthias Kaehlcke wrote:
> > 
> > Thanks, it would also require to move the initialization of
> > ieee80211_default_rc_algo into an ifdef. If you can live with such a
> > solution I'm happy to change it.
> 
> I think that'd be something I can live with, yeah.
> 
> > > 	git grep 'IS_ENABLED(' | grep '&&'
> > 
> > Indeed the warning is not triggered by these constructs. It seems
> > clang only emits the warning when the constant operand is not
> > boolean.
> 
> That points to just adding "> 0" to the condition here as another
> alternative solution, I guess? With a comment to make sure it's not
> removed again, that'd seem like the best thing to do.

Good point, that's more digestible. I'll send an updated change soon.

Matthias

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


Thread

[PATCH] mac80211: Fix clang warning about constant operand in logical operation Matthias Kaehlcke <mka@chromium.org> - 2017-04-06 21:00 +0200
  Re: [PATCH] mac80211: Fix clang warning about constant operand in  logical operation Johannes Berg <johannes@sipsolutions.net> - 2017-04-06 21:20 +0200
    Re: [PATCH] mac80211: Fix clang warning about constant operand in  logical operation Matthias Kaehlcke <mka@chromium.org> - 2017-04-06 21:30 +0200
      Re: [PATCH] mac80211: Fix clang warning about constant operand in  logical operation Johannes Berg <johannes@sipsolutions.net> - 2017-04-06 23:20 +0200
        Re: [PATCH] mac80211: Fix clang warning about constant operand in  logical operation Matthias Kaehlcke <mka@chromium.org> - 2017-04-07 00:50 +0200
          Re: [PATCH] mac80211: Fix clang warning about constant operand in  logical operation Johannes Berg <johannes@sipsolutions.net> - 2017-04-07 01:00 +0200
            Re: [PATCH] mac80211: Fix clang warning about constant operand in  logical operation Matthias Kaehlcke <mka@chromium.org> - 2017-04-07 01:10 +0200
  RE: [PATCH] mac80211: Fix clang warning about constant operand in  logical operation David Laight <David.Laight@ACULAB.COM> - 2017-04-10 16:20 +0200

csiph-web