Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932939AbbD0ONe (ORCPT ); Mon, 27 Apr 2015 10:13:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51710 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932671AbbD0ON0 convert rfc822-to-8bit (ORCPT ); Mon, 27 Apr 2015 10:13:26 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: Jiri Kosina cc: dhowells@redhat.com, linux-kernel@vger.kernel.org Subject: Compiler warning about comparing result of !!test_bit() to an integer MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8827.1430144003.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Mon, 27 Apr 2015 15:13:23 +0100 Message-ID: <8828.1430144003@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 22 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/