Thread (1 message) 1 message, 1 author, 2017-04-13

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

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2017-04-13 06:27:39
Also in: linux-wireless, lkml

On Thu, 2017-04-06 at 16:31 -0700, Matthias Kaehlcke wrote:
When clang detects a non-boolean constant in a logical operation it
generates a 'constant-logical-operand' warning. In
ieee80211_try_rate_control_ops_get() the result of strlen(<const
str>)
is used in a logical operation, clang resolves the expression to an
(integer) constant at compile time when clang's builtin strlen
function
is used.

Change the condition to check for strlen() > 0 to make the constant
operand boolean and thus avoid the warning.
Applied.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help