Comment # 3 on bug 72576 from
(In reply to comment #2)
> >Which code analyzer found that?
> 
> Sorry, I should have mentioned that.
> 
> cppcheck, as in http://cppcheck.sourceforge.net/
> 
> I find it a useful tool.

Agreed. I started applying it to libsynthesis, activesyncd and of course
SyncEvolution as part of the nightly testing. After some less important changes
(performance, unnecessary writes, style), a handful of suppressions and two
real fixes, the code passes. I'll notice regressions, too.

The other real problem was:

Author: Patrick Ohly <patrick.ohly@intel.com>  2014-01-07 11:04:22
Committer: Patrick Ohly <patrick.ohly@intel.com>  2014-01-17 15:35:55
Parent: 41f917d912c0a0a066e61ac07bd23492ca58af01 (testing: cppcheck redundant
assignment)
Child:  a20a26df4b4ea3870d92982651ff0899bb595034 (cppcheck: suppress warnings)
Branch: for-master/testing
Follows: syncevolution-1-3-99-6
Precedes: 

    testing: fix naming of log files in doCopy()

    The log file guard instance which should have added a "copy" part to log
files
    was deleted again before it could have the desired effect.  Found by
cppcheck
    ("Instance of 'SyncPrefix' object is destroyed immediately.").

----------------------------- test/ClientTest.cpp -----------------------------
index ab6a12f..e9d874d 100644
@@ -2977,9 +2977,9 @@ void SyncTests::deleteAll(DeleteAllMode mode) {
 }

 /** get both clients in sync with empty server, then copy one item from client
A to B */
 void SyncTests::doCopy() {
-    SyncPrefix("copy", *this);
+    SyncPrefix copy("copy", *this);

     // check requirements
     CT_ASSERT(accessClientB);


You are receiving this mail because: