qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1382477] [NEW] hw/i386/intel_iommu.c:902: wrong logica


From: dcb
Subject: [Qemu-devel] [Bug 1382477] [NEW] hw/i386/intel_iommu.c:902: wrong logical operator ?
Date: Fri, 17 Oct 2014 09:55:20 -0000

Public bug reported:

/home/dcb/qemu/trunk/qemu/hw/i386/intel_iommu.c:902:5: error: logical ‘and’ 
applied to non-boolean constant [-Werror=logical-op]
     pvtd_as = s->address_spaces[VTD_SID_TO_BUS(source_id)];
     ^

$ fgrep VTD_SID_TO_BUS `find . -name \*.h -print`
./include/hw/i386/intel_iommu.h:#define VTD_SID_TO_BUS(sid)         (((sid) >> 
8) && 0xff)
$ 

Sounds to me like

#define VTD_SID_TO_BUS(sid)         (((sid) >> 8) & 0xff)

would be better.

** 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/1382477

Title:
  hw/i386/intel_iommu.c:902: wrong logical operator ?

Status in QEMU:
  New

Bug description:
  /home/dcb/qemu/trunk/qemu/hw/i386/intel_iommu.c:902:5: error: logical ‘and’ 
applied to non-boolean constant [-Werror=logical-op]
       pvtd_as = s->address_spaces[VTD_SID_TO_BUS(source_id)];
       ^

  $ fgrep VTD_SID_TO_BUS `find . -name \*.h -print`
  ./include/hw/i386/intel_iommu.h:#define VTD_SID_TO_BUS(sid)         (((sid) 
>> 8) && 0xff)
  $ 

  Sounds to me like

  #define VTD_SID_TO_BUS(sid)         (((sid) >> 8) & 0xff)

  would be better.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1382477/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]