All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1926995] [NEW] hw/remote/mpqemu-link.c:221: bad error checking ?
@ 2021-05-03 18:48 dcb
  2021-05-08  4:36 ` [Bug 1926995] " Thomas Huth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dcb @ 2021-05-03 18:48 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

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.

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

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

Status in QEMU:
  New

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1926995] Re: hw/remote/mpqemu-link.c:221: bad error checking ?
  2021-05-03 18:48 [Bug 1926995] [NEW] hw/remote/mpqemu-link.c:221: bad error checking ? dcb
@ 2021-05-08  4:36 ` Thomas Huth
  2021-05-25  7:42 ` Thomas Huth
  2021-08-25  7:06 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-05-08  4:36 UTC (permalink / raw)
  To: qemu-devel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1926995] Re: hw/remote/mpqemu-link.c:221: bad error checking ?
  2021-05-03 18:48 [Bug 1926995] [NEW] hw/remote/mpqemu-link.c:221: bad error checking ? dcb
  2021-05-08  4:36 ` [Bug 1926995] " Thomas Huth
@ 2021-05-25  7:42 ` Thomas Huth
  2021-08-25  7:06 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-05-25  7:42 UTC (permalink / raw)
  To: qemu-devel

Fix has been merged now:
https://gitlab.com/qemu-project/qemu/-/commit/dcf20655ffca2b0219d2914d

** Changed in: qemu
       Status: In Progress => Fix Committed

-- 
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:
  Fix Committed

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1926995] Re: hw/remote/mpqemu-link.c:221: bad error checking ?
  2021-05-03 18:48 [Bug 1926995] [NEW] hw/remote/mpqemu-link.c:221: bad error checking ? dcb
  2021-05-08  4:36 ` [Bug 1926995] " Thomas Huth
  2021-05-25  7:42 ` Thomas Huth
@ 2021-08-25  7:06 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-08-25  7:06 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: Fix Committed => Fix Released

-- 
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:
  Fix Released

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-25  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 18:48 [Bug 1926995] [NEW] hw/remote/mpqemu-link.c:221: bad error checking ? dcb
2021-05-08  4:36 ` [Bug 1926995] " Thomas Huth
2021-05-25  7:42 ` Thomas Huth
2021-08-25  7:06 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.