cppcheck static code analysis reveals some true positives

Bug #1114525 reported by MC Return
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
MC Return
compiz (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

[plugins/trailfocus/src/trailfocus.cpp:227]: (style) Unused variable: iter

[plugins/thumbnail/src/thumbnail.cpp:284]: (style) Variable 'distance' is assigned a value that is never used.

[plugins/td/src/3d.cpp:491] -> [plugins/td/src/3d.cpp:495]: (performance) Variable 'rv' is reassigned a value before the old one has been used.

[src/screen.cpp:2700]: (performance) Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code.

[src/window.cpp:3449]: (performance) Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code.
[src/window.cpp:3459]: (performance) Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code.
[src/window.cpp:4062]: (performance) Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code.

[plugins/decor/src/decor.cpp:890]: (error) Uninitialized variable: frameType
[plugins/decor/src/decor.cpp:891]: (error) Uninitialized variable: frameState
[plugins/decor/src/decor.cpp:892]: (error) Uninitialized variable: frameActions

[plugins/group/src/glow.cpp:323] -> [plugins/group/src/glow.cpp:346]: (performance) Variable 'x2' is reassigned a value before the old one has been used.

[plugins/resize/src/logic/src/resize-logic.cpp:1372] -> [plugins/resize/src/logic/src/resize-logic.cpp:1379]: (performance) Variable 'lco' is reassigned a value before the old one has been used.
[plugins/resize/src/logic/src/resize-logic.cpp:1372] -> [plugins/resize/src/logic/src/resize-logic.cpp:1380]: (performance) Variable 'rco' is reassigned a value before the old one has been used.
[plugins/resize/src/logic/src/resize-logic.cpp:1372] -> [plugins/resize/src/logic/src/resize-logic.cpp:1381]: (performance) Variable 'tco' is reassigned a value before the old one has been used.
[plugins/resize/src/logic/src/resize-logic.cpp:1372] -> [plugins/resize/src/logic/src/resize-logic.cpp:1382]: (performance) Variable 'bco' is reassigned a value before the old one has been used.

[plugins/resizeinfo/src/resizeinfo.cpp:138]: (warning) %d in format string (no. 1) requires a signed integer given in the argument list.
[plugins/resizeinfo/src/resizeinfo.cpp:138]: (warning) %d in format string (no. 2) requires a signed integer given in the argument list.

Related branches

MC Return (mc-return)
Changed in compiz:
assignee: nobody → MC Return (mc-return)
MC Return (mc-return)
description: updated
MC Return (mc-return)
Changed in compiz:
status: New → In Progress
Changed in compiz:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.9~daily13.02.07-0ubuntu1

---------------
compiz (1:0.9.9~daily13.02.07-0ubuntu1) raring; urgency=low

  [ MC Return ]
  * [regression][GLES] gears plugin does not build any more (LP:
    #1020822)
  * Cube Gears plugin: Cylinders inside the gears are not rendered
    correctly (LP: #1117311)
  * compiz-profile-active-Default.convert and compiz-profile-active-
    Default.convert are referring to refres_rate and detect_refres_rate
    (LP: #1115243)
  * cppcheck static code analysis reveals some true positives (LP:
    #1114525)

  [ Automatic PS uploader ]
  * Automatic snapshot from revision 3599
 -- Automatic PS uploader <email address hidden> Thu, 07 Feb 2013 06:19:48 +0000

Changed in compiz (Ubuntu):
status: New → Fix Released
MC Return (mc-return)
Changed in compiz:
importance: Undecided → Medium
Stephen M. Webb (bregma)
Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.