qemu-devel
[Top][All Lists]
Advanced

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

[Bug 1926995] Re: hw/remote/mpqemu-link.c:221: bad error checking ?


From: Thomas Huth
Subject: [Bug 1926995] Re: hw/remote/mpqemu-link.c:221: bad error checking ?
Date: Sat, 08 May 2021 04:36:39 -0000

Thanks, I've reported it on the mailing list, and a patch has now been posted 
here:
https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg02106.html

** Changed in: qemu
       Status: New => In Progress

** Changed in: qemu
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1926995

Title:
  hw/remote/mpqemu-link.c:221: bad error checking ?

Status in QEMU:
  In Progress

Bug description:
  hw/remote/mpqemu-link.c:221:36: warning: logical ‘and’ of mutually
  exclusive tests is always false [-Wlogical-op]

  Source code is

     if (msg->cmd >= MPQEMU_CMD_MAX && msg->cmd < 0) {
          return false;
      }

  Maybe better code:

     if (msg->cmd >= MPQEMU_CMD_MAX || msg->cmd < 0) {
          return false;
      }

  It might be useful to switch on gcc compiler flag -Wlogical-op
  to see these warnings.

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



reply via email to

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