Patrick Ohly changed bug 72576
What Removed Added
Status NEW ASSIGNED
Assignee syncevolution-issues@syncevolution.org patrick.ohly@gmx.de

Comment # 1 on bug 72576 from
Which code analyzer found that? I run Klocwork occasionally and analyzed all
problems in SyncEvolution code itself that Klocwork reported. In libsynthesis
the code triggered more warnings. The false negative rate was higher than in
SyncEvolution due to the different coding style, so I only checked some issues
there.

Anyway, I don't remember this one.

The code is the result of an invalid rewrite:
-        if (it->lock()->getPriority() <= session->getPriority()) {
+        // skip over dead sessions, they will get cleaned up elsewhere
+        boost::shared_ptr<Session> session = it->lock();
+        if (session && session->getPriority() <= session->getPriority()) {

The session variable here shadows the session parameter, which clearly isn't
right. It's not that important, though, because session priorities aren't used
much (not at all?).

I'll fix it. Thanks for reporting this.


You are receiving this mail because: