qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <1926995@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1926995] Re: hw/remote/mpqemu-link.c:221: bad error checking ?
Date: Tue, 25 May 2021 07:42:27 -0000	[thread overview]
Message-ID: <162192854742.32409.18168712414132065534.malone@soybean.canonical.com> (raw)
In-Reply-To: 162006770303.13621.18026521974059309297.malonedeb@wampee.canonical.com

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


  parent reply	other threads:[~2021-05-25  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-08-25  7:06 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162192854742.32409.18168712414132065534.malone@soybean.canonical.com \
    --to=1926995@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).