From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqMyc-0001Lr-6c for qemu-devel@nongnu.org; Wed, 13 Apr 2016 11:45:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqMyY-0004lq-W3 for qemu-devel@nongnu.org; Wed, 13 Apr 2016 11:45:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqMyY-0004ld-Rd for qemu-devel@nongnu.org; Wed, 13 Apr 2016 11:45:06 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 7978E7F6CF for ; Wed, 13 Apr 2016 15:45:06 +0000 (UTC) From: Gerd Hoffmann Date: Wed, 13 Apr 2016 17:44:55 +0200 Message-Id: <1460562303-17079-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1460562303-17079-1-git-send-email-kraxel@redhat.com> References: <1460562303-17079-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL v2 1/9] 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: Gerd Hoffmann , "Michael S. Tsirkin" "_x" must be "(_x)" otherwise things fail if you pass in expressions. Signed-off-by: Gerd Hoffmann Reviewed-by: Eric Blake Message-id: 1460440299-26654-1-git-send-email-kraxel@redhat.com --- 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