qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: dcb <1856549@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1856549] Re: qemu-4.2.0/hw/misc/mac_via.c: 2 * bad test ?
Date: Mon, 16 Dec 2019 11:58:44 -0000	[thread overview]
Message-ID: <157649752475.4226.12810383033052233683.malone@chaenomeles.canonical.com> (raw)
In-Reply-To: 157649490094.7480.17075229014510714852.malonedeb@soybean.canonical.com

gcc compiler flag -Wduplicated-cond will catch this kind of problem.

You might want to switch it on in your builds. It has been available for
over a year.

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

Title:
  qemu-4.2.0/hw/misc/mac_via.c: 2 * bad test ?

Status in QEMU:
  New

Bug description:
  1.

  qemu-4.2.0/hw/misc/mac_via.c:417:27: style: Expression is always false
  because 'else if' condition matches previous condition at line 412.
  [multiCondition]

                  } else if ((m->data_out & 0xf3) == 0xa1) {
  ...
                  } else if ((m->data_out & 0xf3) == 0xa1) {

  2.

  qemu-4.2.0/hw/misc/mac_via.c:467:27: style: Expression is always false
  because 'else if' condition matches previous condition at line 463.
  [multiCondition]

  Duplicate.

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


  reply	other threads:[~2019-12-16 12:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 11:15 [Bug 1856549] [NEW] qemu-4.2.0/hw/misc/mac_via.c: 2 * bad test ? dcb
2019-12-16 11:58 ` dcb [this message]
2019-12-16 13:03   ` [Bug 1856549] " Philippe Mathieu-Daudé
2019-12-16 13:03     ` Philippe Mathieu-Daudé
2019-12-16 16:52 ` Philippe Mathieu-Daudé
2019-12-16 17:32 ` Laurent Vivier
2020-01-07 10:55 ` Philippe Mathieu-Daudé
2020-03-10  9:09 ` Laurent Vivier
2020-04-30 13:40 ` Laurent Vivier

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=157649752475.4226.12810383033052233683.malone@chaenomeles.canonical.com \
    --to=1856549@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).