From: dcb <1926995@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1926995] [NEW] hw/remote/mpqemu-link.c:221: bad error checking ?
Date: Mon, 03 May 2021 18:48:22 -0000 [thread overview]
Message-ID: <162006770303.13621.18026521974059309297.malonedeb@wampee.canonical.com> (raw)
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
next reply other threads:[~2021-05-03 18:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 18:48 dcb [this message]
2021-05-08 4:36 ` [Bug 1926995] Re: hw/remote/mpqemu-link.c:221: bad error checking ? Thomas Huth
2021-05-25 7:42 ` Thomas Huth
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=162006770303.13621.18026521974059309297.malonedeb@wampee.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 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.