lkml.org 
[lkml]   [2015]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectCompiler warning about comparing result of !!test_bit() to an integer
Date
Hi Jiri,

This line in hid-input.c:

if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
input_event(input, EV_MSC, MSC_SCAN, usage->hid);

gives:

../drivers/hid/hid-input.c: In function 'hidinput_hid_event':
../drivers/hid/hid-input.c:1160:167: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]

with gcc-5.1. Given that 'value' doesn't appear to be a boolean, is this correct?

This was introduced by commit c01d50d181f074a60bf3ed54eb055ce1679afb98.

David


\
 
 \ /
  Last update: 2015-04-27 16:21    [W:0.044 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site