Received: from eggs.gnu.org ([2001:4830:134:3::10]:53831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqNnW-0001UL-Np for qemu-devel@nongnu.org; Mon, 17 Nov 2014 10:01:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqNnQ-0002Vx-MU for qemu-devel@nongnu.org; Mon, 17 Nov 2014 10:00:58 -0500 Received: from indium.canonical.com ([91.189.90.7]:37598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqNnQ-0002VZ-2W for qemu-devel@nongnu.org; Mon, 17 Nov 2014 10:00:52 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1XqNnO-0004Cq-To for ; Mon, 17 Nov 2014 15:00:50 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id DA3DB2E80C6 for ; Mon, 17 Nov 2014 15:00:50 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 17 Nov 2014 14:53:01 -0000 From: dcb <1393440@bugs.launchpad.net> Sender: bounces@canonical.com References: <20141117145301.14743.14744.malonedeb@wampee.canonical.com> Message-Id: <20141117145301.14743.14744.malonedeb@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1393440] [NEW] pcie.c:148: possible error in OR expression ? Reply-To: Bug 1393440 <1393440@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Public bug reported: [qemu/hw/pci/pcie.c:148] -> [qemu/hw/pci/pcie.c:148]: (style) Same expression on both sides of '|'. pci_long_test_and_set_mask(dev->w1cmask + pos + PCI_EXP_DEVSTA, PCI_EXP_DEVSTA_CED | PCI_EXP_DEVSTA_NFED | PCI_EXP_DEVSTA_URD | PCI_EXP_DEVSTA_URD); I am guessing that something like pci_long_test_and_set_mask(dev->w1cmask + pos + PCI_EXP_DEVSTA, PCI_EXP_DEVSTA_CED | PCI_EXP_DEVSTA_NFED | PCI_EXP_DEVSTA_FED | PCI_EXP_DEVSTA_URD); was intended. I used static analyser cppcheck to find this bug. ** Affects: qemu Importance: Undecided Status: New -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1393440 Title: pcie.c:148: possible error in OR expression ? Status in QEMU: New Bug description: [qemu/hw/pci/pcie.c:148] -> [qemu/hw/pci/pcie.c:148]: (style) Same expression on both sides of '|'. pci_long_test_and_set_mask(dev->w1cmask + pos + PCI_EXP_DEVSTA, PCI_EXP_DEVSTA_CED | PCI_EXP_DEVSTA_NFED | PCI_EXP_DEVSTA_URD | PCI_EXP_DEVSTA_URD); I am guessing that something like pci_long_test_and_set_mask(dev->w1cmask + pos + PCI_EXP_DEVSTA, PCI_EXP_DEVSTA_CED | PCI_EXP_DEVSTA_NFED | PCI_EXP_DEVSTA_FED | PCI_EXP_DEVSTA_URD); was intended. I used static analyser cppcheck to find this bug. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1393440/+subscriptions