From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aprEx-00063l-9A for qemu-devel@nongnu.org; Tue, 12 Apr 2016 01:51:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aprEu-00034z-4i for qemu-devel@nongnu.org; Tue, 12 Apr 2016 01:51:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aprEt-00034v-Ve for qemu-devel@nongnu.org; Tue, 12 Apr 2016 01:51:52 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B59F47048 for ; Tue, 12 Apr 2016 05:51:51 +0000 (UTC) From: Gerd Hoffmann Date: Tue, 12 Apr 2016 07:51:39 +0200 Message-Id: <1460440299-26654-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH v2] virtio-input: add parenthesis to const_le{16, 32} List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, Gerd Hoffmann , "Michael S. Tsirkin" "_x" must be "(_x)" otherwise things fail if you pass in expressions. Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-input.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/hw/virtio/virtio-input.h b/include/hw/virtio/virtio-input.h index af1c207..169adee 100644 --- a/include/hw/virtio/virtio-input.h +++ b/include/hw/virtio/virtio-input.h @@ -15,13 +15,13 @@ typedef struct virtio_input_event virtio_input_event; #if defined(HOST_WORDS_BIGENDIAN) # define const_le32(_x) \ - (((_x & 0x000000ffU) << 24) | \ - ((_x & 0x0000ff00U) << 8) | \ - ((_x & 0x00ff0000U) >> 8) | \ - ((_x & 0xff000000U) >> 24)) + ((((_x) & 0x000000ffU) << 24) | \ + (((_x) & 0x0000ff00U) << 8) | \ + (((_x) & 0x00ff0000U) >> 8) | \ + (((_x) & 0xff000000U) >> 24)) # define const_le16(_x) \ - (((_x & 0x00ff) << 8) | \ - ((_x & 0xff00) >> 8)) + ((((_x) & 0x00ff) << 8) | \ + (((_x) & 0xff00) >> 8)) #else # define const_le32(_x) (_x) # define const_le16(_x) (_x) -- 1.8.3.1