Suspicious code in revision 864329

Christoph Bartoschek bartoschek at
Thu Sep 25 00:23:50 BST 2008

- kdebase/workspace/plasma/containments/panel/panel.cpp:319

This if statement is always true because the compiler reads 
(form == Plasma::Horizontal) || Plasma::Vertical and
Plasma::Vertical is not 0.

- kdebase/workspace/plasma/shells/desktop/panelview.cpp:82

Line 74 indicates that panel could be NULL here.

- kdebase/apps/konqueror/src/konqview.cpp:196

Line 175 indicates that m_pPart could be NULL here. Same for lines 150 and 

- kdebase/workspace/kwin/scene_xrender.cpp:528, 533
  kdebase/workspace/kwin/scene_opengl.cpp:1318, 1323
This if statements cannot be true because this cases are already handled by
lines 526 and 1316

- kdebase/workspace/ksysguard/gui/SensorDisplayLib/

Line 604 indicates that mVerticalLinesDistance can be 0. If this is the case
and the execution reaches this line, then a devision by 0 is the result.

- kdebase/workspace/ksysguard/gui/, 551

If the condition in line 538 is false then newDisplay is NULL here.

- kdebase/workspace/powerdevil/kcmodule/CapabilitiesPage.cpp:205

There is no need to confuse the reader and use the bitwise-or here.

- kdebase/workspace/powerdevil/kcmodule/CapabilitiesPage.cpp:304

If line 270 is false and line 278 is false but line 298 is true, then butly 
is NULL here.

- kdebase/workspace/kcontrol/kfontinst/kcmfontinst/FontList.cpp:641

Consider including <cmath> to see all overloads of abs().

- kdesvn/kdesdk/umbrello/umbrello/uml.cpp:2262

If cmd == NULL in line 2259 then this line crashes.

- kdepim/kmail/kmfoldertree.cpp:1996

Line 2031 indicates that parent can be NULL here. This means that during the
next iteration of the loop starting at 1988 it can also be NULL here.

- kdepim/kmail/foldertreebase.cpp:224, 216

Line 188 indicates that folder can be NULL here.

- kdepim/kmail/kmfoldercachedimap.cpp:3074

Line 3067 indicates that inboxDir can be NULL here.

- kdepim/kmail/kmmainwidget.cpp:1953

Line 1946 and others indicate that mMsgView can be NULL here.

More information about the kde-core-devel mailing list