Skip to contentSkip to conversation

target-tricore/translate.c:3812: possible bad expression ?

Qemu-devel dcb 2 participants 5 messages Dec 15, 2014 – Jun 21, 2016

lore
Share & tools
lore

dcb

author
#0 lore raw

Public bug reported:

Quoted 1 line

From a run of cppcheck, a static analysis checker, over the

source code of qemu trunk, dated 20141215, is the new error:

[qemu/target-tricore/translate.c:3812]: (style) Expression '(X & 0x3f) == 0x6f' is always false.

Source code is

    if (unlikely((op1 & 0x3f) == OPCM_32_BRN_JTT)) {

Suggest code rework.

** Affects: qemu
Importance: Undecided
Status: New

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

Title:
  target-tricore/translate.c:3812: possible bad expression ?

Status in QEMU:
  New

Bug description:
  
  From a run of cppcheck, a static analysis checker, over the
  source code of qemu trunk, dated 20141215, is the new error:

  [qemu/target-tricore/translate.c:3812]: (style) Expression '(X & 0x3f)
  == 0x6f' is always false.

  Source code is

      if (unlikely((op1 & 0x3f) == OPCM_32_BRN_JTT)) {

  Suggest code rework.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1402802/+subscriptions
#1 lore raw

Absolutly correct. The mask should be 0x7f. I will fix that asap.

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

Title:
  target-tricore/translate.c:3812: possible bad expression ?

Status in QEMU:
  Confirmed

Bug description:
  
  From a run of cppcheck, a static analysis checker, over the
  source code of qemu trunk, dated 20141215, is the new error:

  [qemu/target-tricore/translate.c:3812]: (style) Expression '(X & 0x3f)
  == 0x6f' is always false.

  Source code is

      if (unlikely((op1 & 0x3f) == OPCM_32_BRN_JTT)) {

  Suggest code rework.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1402802/+subscriptions
#2 lore raw
In reply to dcb

** Changed in: qemu
Status: New => Confirmed

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

Title:
  target-tricore/translate.c:3812: possible bad expression ?

Status in QEMU:
  Confirmed

Bug description:
  
  From a run of cppcheck, a static analysis checker, over the
  source code of qemu trunk, dated 20141215, is the new error:

  [qemu/target-tricore/translate.c:3812]: (style) Expression '(X & 0x3f)
  == 0x6f' is always false.

  Source code is

      if (unlikely((op1 & 0x3f) == OPCM_32_BRN_JTT)) {

  Suggest code rework.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1402802/+subscriptions
#3 lore raw
In reply to dcb

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

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

Title:
  target-tricore/translate.c:3812: possible bad expression ?

Status in QEMU:
  Fix Committed

Bug description:
  
  From a run of cppcheck, a static analysis checker, over the
  source code of qemu trunk, dated 20141215, is the new error:

  [qemu/target-tricore/translate.c:3812]: (style) Expression '(X & 0x3f)
  == 0x6f' is always false.

  Source code is

      if (unlikely((op1 & 0x3f) == OPCM_32_BRN_JTT)) {

  Suggest code rework.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1402802/+subscriptions
author
#4 lore raw
In reply to dcb

http://git.qemu.org/?p=qemu.git;a=commitdiff;h=7f13420ec000ad7644b65e

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

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

Title:
  target-tricore/translate.c:3812: possible bad expression ?

Status in QEMU:
  Fix Released

Bug description:
  
  From a run of cppcheck, a static analysis checker, over the
  source code of qemu trunk, dated 20141215, is the new error:

  [qemu/target-tricore/translate.c:3812]: (style) Expression '(X & 0x3f)
  == 0x6f' is always false.

  Source code is

      if (unlikely((op1 & 0x3f) == OPCM_32_BRN_JTT)) {

  Suggest code rework.

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